WO2017016130A1 - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
WO2017016130A1
WO2017016130A1 PCT/CN2015/096709 CN2015096709W WO2017016130A1 WO 2017016130 A1 WO2017016130 A1 WO 2017016130A1 CN 2015096709 W CN2015096709 W CN 2015096709W WO 2017016130 A1 WO2017016130 A1 WO 2017016130A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
layer node
processing
node
layer
Prior art date
Application number
PCT/CN2015/096709
Other languages
French (fr)
Chinese (zh)
Inventor
吕冬冬
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017016130A1 publication Critical patent/WO2017016130A1/en

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/23Reliability checks, e.g. acknowledgments or fault reporting

Definitions

  • the present invention relates to the field of data processing, and in particular to a message processing method and apparatus.
  • Storm is a distributed real-time computing system that can process streaming data simply and reliably.
  • Storm can be applied to real-time analysis, online machine learning, continuous computing, Remote Procedure Call Protocol (RPC) calls, and Extract-Transform-Load (ETL).
  • Storm has the characteristics of scalability, fault tolerance, and high reliability of data processing.
  • Message reliability in streaming computing means that every message (Tuple) sent from the data source is guaranteed to be fully processed.
  • a Tuple in Storm is completely processed: this Tuple and all Tuples generated by this Tuple are successfully processed.
  • a Tuple will be considered to have failed processing if the message was not successfully processed within the time specified by timeout.
  • the existing message reliability scheme mainly guarantees message reliability by introducing Acker components and by XOR algorithm.
  • the task of the Acker component is to track a source from a Spout (Spout refers to a message source in a Storm application.
  • Spout reads data from an external data source and then converts it into source data inside Topology)
  • the Acker component manages the message confirmation signals of all components, and the Acker quantity cannot be dynamically adjusted according to the amount of real-time data, which is easy to cause Acker to be idle or single point of failure.
  • the message source needs to re-process the message from the root node, and the message processing efficiency is low.
  • the embodiment of the invention provides a message processing method and device, so as to at least solve the problem that the efficiency of message processing is low in the case of occurrence of an error in the related art.
  • a message processing method including: a first layer node receives a first message, and stores the first message, where the first layer node includes one or more first nodes; The first layer node processes the first message, generates a second message, and sends the second message to the second layer node, where the second layer node includes one or more second nodes, Each of the first layer nodes corresponds to one or more second nodes; after receiving the second message, the second layer node processes the second message, and the The layer node returns a processing result; if the processing result is a processing failure, the first layer node acquires the stored a message and reprocessing the first message.
  • the method further includes: adding a record of the first message; wherein the first layer node Acquiring the stored first message includes: the first layer node queries the record, and obtains the stored first message.
  • the method before the first layer node receives the first message and stores the first message, the method further includes: the root node encapsulating the received data into a plurality of the first messages, and storing The plurality of the first messages; the root node adding a plurality of records of the first message.
  • the method further includes: the root node sending the first message to the first layer node, starting a timer to start timing; receiving the first before the timer expires The message of successful processing returned by the layer 1 node determines that the first message processing is successful; receives the message that the processing returned by the first layer node fails, or does not receive the message before the timer expires The message that the processing of the first layer node is successful is to query the record of the first message that fails to be processed, obtain the first message that is queried, and resend the first message that is obtained to the first layer node.
  • the method further includes: regenerating the second message, and sending the regenerated second message to the second layer node;
  • the first layer node returns a message that the first message processing fails to the root node, in a case that the processing result of the regenerated second message is still a processing failure.
  • the method further includes: the second layer node stores the second message; processing the second message, generating a third message, and sending the third message to the third layer node a third message, wherein the third layer node includes one or more third nodes, and each of the second layer nodes corresponds to one or more third nodes; the third layer node receiving station After the third message is processed, the third message is processed, and the processing result is returned to the second layer node; if the processing result of the third message is processing failure, the second layer node acquires And storing the second message, and processing the second message again, regenerating the third message, and sending the regenerated third message to the third layer node.
  • the method further includes: when the processing result of the regenerated third message is still a processing failure, the second layer node returns the first layer to the first layer node Two messages failed to process the message.
  • a message processing apparatus including: a first storage unit, disposed on a first layer node, configured to receive a first message, and store the first message, the first The first layer node includes one or more first nodes; the first processing unit is disposed on the first layer node, configured to process the first message, generate a second message, and send the second message to the second layer node The second message, wherein the second layer node includes one or more second nodes, each of the first layer nodes corresponds to one or more second nodes; and the second processing unit, Provided on the second layer node, configured to receive the second message, process the second message, and return a processing result to the first layer node; the first processing unit is further configured to If the processing result is that the processing fails, the stored first message is obtained, and the first message is processed again.
  • the device further includes: a first recording unit, disposed on the first layer node, and configured Adding a record of the first message after receiving the first message at the first layer node, and storing the first message; wherein the first processing unit includes: an obtaining module, configured to query the record, Obtaining the stored first message.
  • the device further includes: a second storage unit, configured on the root node, configured to receive the first message before the first layer node, and store the received data before storing the first message Encapsulating into the plurality of the first messages, storing the plurality of the first messages; the second recording unit, disposed on the root node, is configured to add a plurality of records of the first message.
  • the device further includes: a sending unit, configured to be sent on the root node, configured to send the first message to the first layer node, start a timer to start timing; determine a unit, set Setting, on the root node, a message that the processing returned by the first layer node is successful before the timer expires, determining that the first message processing is successful; the sending unit is further configured to be in Receiving a message that the processing returned by the first layer node fails, or not receiving a message that the processing returned by the first layer node is successful before the timer expires, and querying the first message that the processing fails. Recording, obtaining the first message that is queried, and resending the first message obtained to the first layer node.
  • the first processing unit is further configured to: after reprocessing the first message, regenerate the second message, and send the regenerated second message to the second layer node;
  • the device further includes: a first returning unit, disposed on the first layer node, configured to return to the root node if the processing result of the regenerated second message is still processing failure The message that the first message processing failed.
  • the device further includes: a third storage unit, configured to be configured to store the second message on the second layer node; and a third processing unit, configured to be in the second layer node And configured to process the second message, generate a third message, and send the third message to the third layer node, where the third layer node includes one or more third nodes, Each of the second nodes corresponds to one or more third nodes; the fourth processing unit is disposed on the third layer node, and is configured to receive the third message Processing the message, and returning the processing result to the second layer node; the third processing unit is further configured to: when the processing result of the third message is a processing failure, the second layer node acquires the stored The second message, and processing the second message again, regenerating the third message, and sending the regenerated third message to the third layer node.
  • a third storage unit configured to be configured to store the second message on the second layer node
  • a third processing unit configured to be in the second layer node And configured to process the second message, generate a third message,
  • the device further includes: a second returning unit, configured to be disposed on the second layer node, where the processing result of the regenerated third message is still a processing failure, Returning the message that the second message processing failed to the first layer node.
  • the first layer node acquires the pre-stored first message, and re-processes the first message, so as to regenerate the second message and send it to the second layer.
  • the node and the second layer node can process the regenerated second message without re-processing the message from the root node, thereby solving the problem that the message processing efficiency is low in the case of an error, and the error is improved.
  • FIG. 1 is a flow chart of a message processing method according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of layer-by-layer feedback in accordance with an alternative embodiment of the present invention.
  • FIG. 3 is a schematic diagram of error retransmission in accordance with an alternative embodiment of the present invention.
  • FIG. 4 is a block diagram showing the structure of a message processing apparatus according to an embodiment of the present invention.
  • a message processing method is provided, which can be used for message processing of a streaming computing framework.
  • FIG. 1 is a flowchart of a method at a message according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
  • Step S102 the first layer node receives the first message, and stores the first message, where the first layer node includes one or more first nodes;
  • Step S104 The first layer node processes the first message, generates a second message, and sends a second message to the second layer node, where the second layer node includes one or more second nodes, and the first layer node Each first node corresponds to one or more second nodes;
  • Step S106 After receiving the second message, the second layer node processes the second message, and returns a processing result to the first layer node.
  • Step S108 If the processing result is that the processing fails, the first layer node acquires the stored first message, and re-processes the first message.
  • the first layer node and the second layer node may be intermediate nodes of message processing, wherein the second layer node is a downstream node of the first layer node.
  • the first layer node acquires the pre-stored first message, and re-processes the first message, so as to regenerate the second message to be sent to
  • the second layer node can process the regenerated second message, and does not need to re-process the message from the root node, thereby solving the problem that the message processing efficiency is low in the case of an error, and the problem is improved.
  • the efficiency of message processing in the event of an error is improved.
  • the first node and the second node, and the third node and the like mentioned later may be Bolt.
  • the Bolt is a component of the Storm application for message processing.
  • Bolt can perform any operations such as filtering, function operations, merging, and writing to the database.
  • the first message is stored, which may be a message buffer (Buffer) set on the first layer node, used to cache the sent message, and used for message processing failure retransmission.
  • the second layer node may also store the second message when receiving the second message, so as to obtain the stored second message when the downstream node message processing fails.
  • the method further includes: adding a record of the first message; wherein the first layer node acquiring the stored first message comprises: the first layer node Query the record to get the first message stored.
  • the first layer node may add a record of the first message, so that when the first message is obtained, it may be acquired based on the record.
  • a message confirmation module can be used to add a record to the message.
  • the Ack module may also feed back the message processing situation to the upstream message source and receive the downstream node feedback message.
  • the record form of the message may be an identity identifier set according to a predefined rule, such as a serial number, etc., which is not limited herein.
  • the method further includes: the root node encapsulates the received data into a plurality of first messages, and stores a plurality of first messages; A record of the first message.
  • the root node may be a Spout
  • the root node reads data from the message source, generates an independent message unit, and forwards the message to a plurality of first layer nodes, and the message processed by the first layer node may also pass other Several nodes are processed.
  • the root node may separately send a first message to each of the plurality of first layer nodes, and add a corresponding record, so that when the first layer node fails to process, the corresponding message is obtained from the stored message based on the record, and Sent to the first level node.
  • the method further includes: the root node sends a first message to the first layer node, starts a timer to start timing; and receives a message that the processing returned by the first layer node is successful before the timer expires, and determines the first message processing. Successfully; receiving a message that the processing returned by the first layer node fails, or receiving a message that the processing of the first layer node returns successfully before the expiration of the timer, querying the record of the first message that failed to be processed, and obtaining The first message that is queried will resend the first message obtained to the first layer node.
  • the root node If the root node receives the successful message of the sent message during the timer period, it indicates that the corresponding message processing is successful. When the message that the message is successfully processed or the message that failed the process is received after the timeout expires, the source data is restored from the cache for retransmission.
  • the method further includes: regenerating the second message, and sending the regenerated second message to the second layer node; wherein, in the regenerated second message If the processing result is still processing failure, the first layer node returns a message that the first message processing fails to the root node.
  • the second message when the second layer node fails to process the second message, the second message is regenerated and is sent to the second layer.
  • the node resends the regenerated second message so that the second layer node pair reprocesses, and if the processing fails again, the first layer node returns a message that the processing failed to the root node.
  • the method further includes: the second layer node stores the second message; processes the second message, generates a third message, and sends a third message to the third layer node, where the third layer node includes one or more a third node, each second node of the second layer node corresponds to one or more third nodes; after receiving the third message, the third layer node processes the third message and returns the processing result to the second layer node If the processing result of the third message is that the processing fails, the second layer node acquires the stored second message, and re-processes the second message, regenerates the third message, and sends the regenerated message to the third layer node. Third message.
  • the second layer node processes the second message and generates a third message, which is sent to the third layer node.
  • the second layer node acquires the second message, and regenerates the third message and retransmits, so that the third layer node reprocesses. In this way, when the processing of the third layer node fails, it is not necessary to repeat the processing from the root node, and only the second message is reprocessed from the second layer node, which greatly improves the efficiency of message processing in the case of an error.
  • the method further comprises: in the case that the processing result of the regenerated third message is still the processing failure, the second layer node returns a message that the second message processing fails to the first layer node.
  • the second layer node If the processing result is still processing failure after the third message is reprocessed, the second layer node returns a message that the processing fails to the first layer node. This makes it possible to report to the root node when the message processing fails.
  • Spout reads data from the message source, generates a separate message unit, and forwards the message to several Bolt processes.
  • the Bolt-processed message may also be processed by several other Bolts.
  • Both Spout and Bolt contain the Buffer module and the Ack module. The data is buffered in the buffer before the message is processed and recorded in the Ack module. After the data processing is completed, the processing result is fed back to the upstream data source through the Ack module.
  • the message processing method of the streaming framework includes the following steps:
  • the Spout processes the source data and distributes the message generated by the source data to the downstream Bolt.
  • the generated message is stored in the buffer buffer and the timer is started.
  • the Ack module in Spout adds a record to the message.
  • Bolt receives upstream messages and processes the data. If the Bolt still has a downstream module, the Ack module records the message to be sent and stores the upstream message in the cache. On the contrary, after the data processing is completed, the Ack module feeds back the ack_msg message to the upstream to indicate that the message processing is successful, and the message processing fails to feed back the fail_msg message.
  • Bolt After receiving the ack_msg message of all downstream Bolt feedback corresponding to a message, Bolt deletes the strip in the cache. And feed back ack messages to the upstream Bolt or Spout. If a fail message is received, the corresponding message is restored from the cache and reprocessed.
  • Spout receives the ack message of the sent message within the period of the timer, it indicates that the corresponding message is processed successfully.
  • the source data is restored from the cache for retransmission.
  • Spout encapsulates the collected data into a number of messages Tuple.
  • the messages with the id numbers msg_0 and msg_1 are generated, and the Tuple is sent to the Bolt to start the timer.
  • Spout caches the tuple to be sent to its own buffer, and ack adds a record to the message.
  • the record format is (msg_0), (msg_1).
  • Bolt accepts the message Tuple from the upstream Bolt or Spout, serial number is parent_id, caches the data, and processes the data.
  • the processing result is divided into two cases: generating a new Tuple, or not generating a new Tuple after processing.
  • the Ack module in Bolt adds the record (parent_id, msg_id) and stores the message from the upstream into the cache.
  • the parent_id indicates the id number of the Tuple sent upstream to the Bolt.
  • the Bolt may generate multiple new messages from the upstream Tuple.
  • the id numbers are msg_id_1, msg_id_2...msg_id_n.
  • Message records are usually implemented using data structures such as HashMap.
  • two Bolts downstream of Spout process messages with id msg_0 and msg_1 generate messages msg_2, msg_3, and msg_4, and add records to their respective caches (msg_0, msg_2 ⁇ msg_3), (msg_1, msg_4). . If the message fails to be processed, the processing failure message fail_msg is fed back to the upstream component, and the id number of the message that failed to be processed is included in the fail_msg.
  • the upstream component processes the message with the id number parent_id, and generates messages with the id numbers msg_id_1, msg_id_2, ..., msg_id_n, distributes the generated message to the downstream component for processing, and adds the message record (parent_id, msg_id_1 ⁇ msg_id_2... ⁇ Msg_id_n).
  • the acknowledgment message ack_msg or the failure message fail_msg is sent to the message source of the parent_id, and the format of the message data part is confirmed as (parent_id, msg_id).
  • the ack_msg message is respectively fed back to the upstream, indicating that the respective message processing is completed.
  • the Ack module After Bolt or Spout receives the acknowledgement message ack_msg from the downstream Bolt, the Ack module queries the record corresponding to the parent_id in the ack message, and XORs the record with the msg_id of ack_msg. If the XOR result is 0, it indicates that the message corresponding to the parent_id has been completely processed, and the feedback of the parent_id message to the upstream is continued.
  • the message record (msg_0, msg_2 ⁇ msg_3) is found, and the recorded value msg_2 ⁇ msg_3 is XORed with the values msg_2 and msg_3 in the received confirmation message, respectively. If it is 0, it indicates that the message msg_0 is processed successfully, and the cache of msg_0 is deleted. Similarly, the msg_4 in the record (msg_1, msg_4) is XORed with the value msg_4 in the downstream ack_msg message, and the result is 0, indicating that the msg_1 process is completed.
  • Bolt or Spout receives the processing failure message fail_msg from the downstream Bolt, the message that failed processing is restored from the cache to reprocess the retransmission. If the downstream continues to return fail_msg, the retransmission is stopped, and the fail_msg message is continuously fed back to the upstream.
  • the specific process is shown in Figure 3.
  • the msg_2 processing fails, the fail_msg message is sent to the Bolt, and the Bolt query record is reprocessed from the cache recovery message msg_0, and the messages msg_2 and msg_3 are generated and retransmitted separately.
  • the downstream component continues to reprocess msg_2 and msg_3, and the processing succeeds in layer-by-layer feedback.
  • Each Bolt component repeats the above process, and continuously feeds back the processing result to the upstream until Spout receives the feedback message from the downstream Bolt, and receiving ack_msg indicates that the message processing is successful.
  • the Bolt downstream of the Spout in FIG. 2 receives the acknowledgment signal of all the messages and sends ack_msg to the Spout, and the Spout receives the message confirming that the message is processed and deletes the cache.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
  • the embodiment ensures the reliability of the message by means of layer-by-layer feedback, and reduces the overload or the node idle because the number of Acker nodes cannot be dynamically adjusted.
  • the processing nodes of each layer are provided with a cache, which reduces the number of times of message retransmission and reprocessing in the event of an error. Improve network efficiency and reduce network overhead.
  • a message processing device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again.
  • the terms "unit”, “module” may perform a predetermined function.
  • a combination of software and/or hardware is also possible and contemplated.
  • FIG. 4 is a structural block diagram of a message processing apparatus according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes: a first storage unit 202, a first processing unit 204, and a second processing unit 206.
  • the first storage unit 202 is disposed on the first layer node, configured to receive the first message, and store the first message.
  • the first layer node includes one or more first nodes.
  • the first processing unit 204 is disposed on the first layer node, configured to process the first message, generate a second message, and send the second message to the second layer node.
  • the second layer node includes one or more second nodes, and each of the first layer nodes corresponds to one or more second nodes.
  • the second processing unit 206 is disposed on the second layer node, and is configured to process the second message after receiving the second message, and return the processing result to the first layer node.
  • the first processing unit 204 is further configured to acquire the stored first message and reprocess the first message if the processing result is a processing failure.
  • the first node included in the first layer node and the second node included in the second layer node may be intermediate nodes of message processing, wherein the second layer node is a downstream node of the first layer node.
  • the first layer node acquires the pre-stored first message, and re-processes the first message, so as to regenerate the second message to be sent to
  • the second layer node can process the regenerated second message, and does not need to re-process the message from the root node, thereby solving the problem that the message processing efficiency is low in the case of an error, and the problem is improved.
  • the efficiency of message processing in the event of an error is improved.
  • the first layer node and the second layer node, and the third layer node and the like mentioned later may all be Bolt, which is a component for message processing in the Storm application, and the Bolt may perform filtering, Function operations, merges, writes to the database, and so on.
  • the device further includes: a first recording unit, disposed on the first layer node, configured to: after receiving the first message at the first layer node, and storing the first message, adding a record of the first message;
  • a processing unit includes: an acquisition module configured to query the record to obtain the stored first message.
  • the first layer node may add a record of the first message, so that when the first message is obtained, it may be acquired based on the record.
  • the first recording unit may be a message confirmation module (Ack module) for adding a record to the message.
  • the record form of the message may be an identity identifier set according to a predefined rule, such as a serial number, etc., which is not limited herein.
  • the device further includes: a second storage unit, disposed on the root node, configured to encapsulate the received data into a plurality of first messages before the first layer node receives the first message and stores the first message, Storing a plurality of first messages; a second recording unit, disposed on the root node, configured to add a record of the plurality of first messages.
  • a second storage unit disposed on the root node, configured to encapsulate the received data into a plurality of first messages before the first layer node receives the first message and stores the first message, Storing a plurality of first messages
  • a second recording unit disposed on the root node, configured to add a record of the plurality of first messages.
  • the root node may be a Spout
  • the root node reads data from the message source, generates an independent message unit, and forwards the message to a plurality of first layer nodes, and the message processed by the first layer node may also pass other Several nodes are processed.
  • the root node may separately send a first message to each of the plurality of first layer nodes, and add a corresponding record, so that when the first layer node fails to process, the corresponding message is obtained from the stored message based on the record, and Sent to the first level node.
  • the device further comprises: a sending unit, configured on the root node, configured to send a first message to the first layer node, start a timer to start timing; determine a unit, set on the root node, and set to expire at the timer Before receiving the message of successful processing returned by the first layer node, it is determined that the first message processing is successful; the sending unit is further configured to receive the message that the processing returned by the first layer node fails, or before the timer expires After receiving the message that the processing of the first layer node is successful, the queried first message of the processing failure is obtained, and the first message that is queried is obtained, and the obtained first message is sent to the first layer node again.
  • a sending unit configured on the root node, configured to send a first message to the first layer node, start a timer to start timing; determine a unit, set on the root node, and set to expire at the timer Before receiving the message of successful processing returned by the first layer node, it is determined that the first message processing is successful;
  • the root node If the root node receives the successful message of the sent message during the timer period, it indicates that the corresponding message processing is successful. When the message that the message is successfully processed or the message that failed the process is received after the timeout expires, the source data is restored from the cache for retransmission.
  • the first processing unit is further configured to: after reprocessing the first message, regenerate the second message, and send the regenerated second message to the second layer node; wherein the device further comprises: the first return unit And being set on the first layer node, and being set to return a message that the first message processing fails to the root node if the processing result of the regenerated second message is still processing failure.
  • the second layer node when the second layer node fails to process the second message, the second message is regenerated and the regenerated second message is resent to the second layer node, so that the second layer node reprocesses If the processing fails again, the first layer node returns a message that the processing failed to the root node.
  • the device further includes: a third storage unit, disposed on the second layer node, configured to store the second message; the third processing unit, configured on the second layer node, configured to process the second message to generate a third message, and sending a third message to the third layer node; the fourth processing unit is set on the third layer node, configured to receive the third message, process the third message, and return to the second layer node Processing the result; the third processing unit is further configured to: when the processing result of the third message is that the processing fails, the second layer node acquires the stored second message, and reprocesses the second message to regenerate the third message. The regenerated third message is sent to the layer 3 node.
  • a third storage unit disposed on the second layer node, configured to store the second message
  • the third processing unit configured on the second layer node, configured to process the second message to generate a third message, and sending a third message to the third layer node
  • the fourth processing unit is set on the third layer node, configured to receive the third message, process the
  • the second layer node processes the second message and generates a third message, which is sent to the third layer node.
  • the second layer node acquires the second message, and regenerates the third message and retransmits, so that the third layer node reprocesses. In this way, when the processing of the third layer node fails, it is not necessary to repeat the processing from the root node, and only the second message is reprocessed from the second layer node, which greatly improves the efficiency of message processing in the case of an error.
  • the apparatus further includes: a second returning unit, disposed on the second layer node, configured to return the second message to the first layer node if the processing result of the regenerated third message is still processing failure Handling failed messages.
  • a second returning unit disposed on the second layer node, configured to return the second message to the first layer node if the processing result of the regenerated third message is still processing failure Handling failed messages.
  • the second layer node If the processing result is still processing failure after the third message is reprocessed, the second layer node returns a message that the processing fails to the first layer node. This makes it possible to report to the root node when the message processing fails.
  • Embodiments of the present invention also provide a storage medium.
  • the foregoing storage medium may be configured to store program code for performing the following steps:
  • Step S1 the first layer node receives the first message, and stores the first message
  • Step S2 The first layer node processes the first message, generates a second message, and sends a second message to the second layer node;
  • Step S3 After receiving the second message, the second layer node processes the second message, and returns a processing result to the first layer node.
  • step S4 if the processing result is that the processing fails, the first layer node acquires the stored first message and re-processes the first message.
  • the first layer node acquires the pre-stored first message, and re-processes the first message, so as to regenerate the second message to be sent to
  • the second layer node can process the regenerated second message, and does not need to re-process the message from the root node, thereby solving the problem that the message processing efficiency is low in the case of an error, and the problem is improved.
  • the efficiency of message processing in the event of an error is improved.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the processor executes, according to the stored program code in the storage medium, the first layer node receives the first message, and stores the first message; the first layer node processes the first message to generate The second message sends a second message to the second layer node; after receiving the second message, the second layer node processes the second message and returns the processing result to the first layer node; if the processing result is a processing failure Next, the first layer node obtains the stored first message and re-processes the first message.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the foregoing technical solution provided by the present invention can be applied to a message processing process.
  • the first layer node acquires the pre-stored first message, and re-pairs the first message.
  • the message is processed, so that the second message is regenerated and sent to the second layer node, and the second layer node can process the regenerated second message without re-processing the message from the root node, thereby solving the error.
  • the problem of low efficiency of message processing improves the efficiency of message processing in the event of an error.

Abstract

Provided are a message processing method and device. The method comprises: a first layer node receives a first message and stores the first message, wherein the first layer node comprises one or more first nodes; the first layer node processes the first message to generate a second message, and sends the second message to a second layer node, wherein the second layer node comprises one or more second nodes, and each of the first nodes in the first layer node corresponds to one or more second nodes; after having received the second message, the second layer node processes the second message, and feeds back a processing result to the first layer node; and in the case where the processing result is a processing failure, the first layer node acquires the stored first message and reprocesses the first message. By means of the present invention, the problem of low message processing efficiency in the case where a mistake occurs is solved, and the message processing efficiency in the case where a mistake occurs is improved.

Description

消息处理方法及装置Message processing method and device 技术领域Technical field
本发明涉及数据处理领域,具体而言,涉及一种消息处理方法及装置。The present invention relates to the field of data processing, and in particular to a message processing method and apparatus.
背景技术Background technique
流式计算框架相对于批处理计算框架,其解决的问题是对实时数据流的计算。Storm是一个分布式是实时计算系统,可以简单可靠地处理流数据。Storm可以应用在实时分析、在线机器学习、连续计算、分布式远程过程调用协议(Remote Procedure Call Protocol,简称为RPC)调用、数据仓库技术(Extract-Transform-Load,简称为ETL)等方面。Storm有可扩展、容错、数据处理可靠性高等特点。The flow computing framework solves the problem with real-time data streams relative to the batch computing framework. Storm is a distributed real-time computing system that can process streaming data simply and reliably. Storm can be applied to real-time analysis, online machine learning, continuous computing, Remote Procedure Call Protocol (RPC) calls, and Extract-Transform-Load (ETL). Storm has the characteristics of scalability, fault tolerance, and high reliability of data processing.
流式计算中的消息可靠性是指保证从数据源发出的每个消息(Tuple)都会被完全处理。在Storm里面一个Tuple被完全处理的意思是:这个Tuple以及由这个Tuple所产生的所有的Tuple都被成功处理。而一个Tuple会被认为处理失败了如果这个消息在timeout所指定的时间内没有成功处理。Message reliability in streaming computing means that every message (Tuple) sent from the data source is guaranteed to be fully processed. A Tuple in Storm is completely processed: this Tuple and all Tuples generated by this Tuple are successfully processed. A Tuple will be considered to have failed processing if the message was not successfully processed within the time specified by timeout.
现有的消息可靠性方案主要通过引入Acker组件并通过异或算法保证消息可靠性。具体地,Acker组件的任务就是跟踪从某个Spout(Spout是指Storm应用(Topology)中的消息源,通常情况下Spout会从外部数据源中读取数据,然后转换为Topology内部的源数据)流出的每一个消息Id所绑定的Tuple树中的所有Tuple的处理情况。如果在用户设置的最大超时时间内这些Tuple没有被完全处理,那么Acker会告诉Spout该消息处理失败,相反则会告知Spout该消息处理成功,它会分别调用Spout中的fail和ack方法。The existing message reliability scheme mainly guarantees message reliability by introducing Acker components and by XOR algorithm. Specifically, the task of the Acker component is to track a source from a Spout (Spout refers to a message source in a Storm application. In general, Spout reads data from an external data source and then converts it into source data inside Topology) The processing of all Tuples in the Tuple tree to which each message Id is bound. If these Tuples are not fully processed within the maximum timeout period set by the user, Acker will tell Spout that the message processing failed. Instead, it will tell Spout that the message is processed successfully. It will call the fail and ack methods in Spout respectively.
然而采用Acker组件管理所有组件的消息确认信号,Acker数量无法根据实时数据量进行动态调整,容易造成Acker闲置或单点故障。另外,在出现差错的情况下,消息源需要从根节点对消息重新进行重复处理,消息处理的效率低。However, the Acker component manages the message confirmation signals of all components, and the Acker quantity cannot be dynamically adjusted according to the amount of real-time data, which is easy to cause Acker to be idle or single point of failure. In addition, in the case of an error, the message source needs to re-process the message from the root node, and the message processing efficiency is low.
发明内容Summary of the invention
本发明实施例提供了一种消息处理方法及装置,以至少解决相关技术中在出现差错的情况下消息处理的效率低的问题。The embodiment of the invention provides a message processing method and device, so as to at least solve the problem that the efficiency of message processing is low in the case of occurrence of an error in the related art.
根据本发明的一个实施例,提供了一种消息处理方法,包括:第一层节点接收第一消息,并存储所述第一消息,所述第一层节点包括一个或者多个第一节点;所述第一层节点对所述第一消息进行处理,生成第二消息,并向第二层节点发送所述第二消息,其中,所述第二层节点包括一个或者多个第二节点,所述第一层节点中的每个第一节点对应一个或者多个第二节点;所述第二层节点接收所述第二消息后,对所述第二消息进行处理,并向所述第一层节点返回处理结果;在所述处理结果为处理失败的情况下,所述第一层节点获取存储的所述第 一消息,并重新对所述第一消息进行处理。According to an embodiment of the present invention, a message processing method is provided, including: a first layer node receives a first message, and stores the first message, where the first layer node includes one or more first nodes; The first layer node processes the first message, generates a second message, and sends the second message to the second layer node, where the second layer node includes one or more second nodes, Each of the first layer nodes corresponds to one or more second nodes; after receiving the second message, the second layer node processes the second message, and the The layer node returns a processing result; if the processing result is a processing failure, the first layer node acquires the stored a message and reprocessing the first message.
在本发明实施例中,在第一层节点接收第一消息,并存储所述第一消息之后,所述方法还包括:添加对所述第一消息的记录;其中,所述第一层节点获取存储的所述第一消息包括:所述第一层节点查询所述记录,获取存储的所述第一消息。In the embodiment of the present invention, after the first layer node receives the first message and stores the first message, the method further includes: adding a record of the first message; wherein the first layer node Acquiring the stored first message includes: the first layer node queries the record, and obtains the stored first message.
在本发明实施例中,在第一层节点接收第一消息,并存储所述第一消息之前,所述方法还包括:根节点将接收到的数据封装成多个所述第一消息,存储所述多个所述第一消息;所述根节点添加多个所述第一消息的记录。In the embodiment of the present invention, before the first layer node receives the first message and stores the first message, the method further includes: the root node encapsulating the received data into a plurality of the first messages, and storing The plurality of the first messages; the root node adding a plurality of records of the first message.
在本发明实施例中,所述方法还包括:所述根节点向所述第一层节点发送所述第一消息,启动定时器开始计时;在所述定时器到期前接收到所述第一层节点返回的处理成功的消息,则确定所述第一消息处理成功;在接收到所述第一层节点返回的处理失败的消息,或者,在所述定时器到期前未接收到所述第一层节点返回的处理成功的消息,则查询处理失败的第一消息的记录,获取查询到的第一消息,重新将向所述第一层节点发送获取到的第一消息。In the embodiment of the present invention, the method further includes: the root node sending the first message to the first layer node, starting a timer to start timing; receiving the first before the timer expires The message of successful processing returned by the layer 1 node determines that the first message processing is successful; receives the message that the processing returned by the first layer node fails, or does not receive the message before the timer expires The message that the processing of the first layer node is successful is to query the record of the first message that fails to be processed, obtain the first message that is queried, and resend the first message that is obtained to the first layer node.
在本发明实施例中,所述第一层节点重新对所述第一消息进行处理之后,所述方法还包括:重新生成第二消息,并向第二层节点发送重新生成的第二消息;其中,在所述重新生成的第二消息的处理结果仍为处理失败的情况下,所述第一层节点向所述根节点返回所述第一消息处理失败的消息。In the embodiment of the present invention, after the first layer node re-processes the first message, the method further includes: regenerating the second message, and sending the regenerated second message to the second layer node; The first layer node returns a message that the first message processing fails to the root node, in a case that the processing result of the regenerated second message is still a processing failure.
在本发明实施例中,所述方法还包括:所述第二层节点存储所述第二消息;对所述第二消息进行处理,生成第三消息,并向第三层节点发送所述第三消息,其中,所述第三层节点包括一个或者多个第三节点,所述第二层节点中的每个第二节点对应一个或者多个第三节点;所述第三层节点接收所述第三消息后,对所述第三消息进行处理,并向所述第二层节点返回处理结果;在所述第三消息的处理结果为处理失败的情况下,所述第二层节点获取存储的所述第二消息,并重新对所述第二消息进行处理,重新生成第三消息,向所述第三层节点发送重新生成的第三消息。In the embodiment of the present invention, the method further includes: the second layer node stores the second message; processing the second message, generating a third message, and sending the third message to the third layer node a third message, wherein the third layer node includes one or more third nodes, and each of the second layer nodes corresponds to one or more third nodes; the third layer node receiving station After the third message is processed, the third message is processed, and the processing result is returned to the second layer node; if the processing result of the third message is processing failure, the second layer node acquires And storing the second message, and processing the second message again, regenerating the third message, and sending the regenerated third message to the third layer node.
在本发明实施例中,所述方法还包括:在所述重新生成的第三消息的处理结果仍为处理失败的情况下,所述第二层节点向所述第一层节点返回所述第二消息处理失败的消息。In the embodiment of the present invention, the method further includes: when the processing result of the regenerated third message is still a processing failure, the second layer node returns the first layer to the first layer node Two messages failed to process the message.
根据本发明的另一实施例,提供了一种消息处理装置,包括:第一存储单元,设置在第一层节点上,设置为接收第一消息,并存储所述第一消息,所述第一层节点包括一个或者多个第一节点;第一处理单元,设置在所述第一层节点上,设置为对所述第一消息进行处理,生成第二消息,并向第二层节点发送所述第二消息,其中,所述第二层节点包括一个或者多个第二节点,所述第一层节点中的每个第一节点对应一个或者多个第二节点;第二处理单元,设置在所述第二层节点上,设置为接收所述第二消息后,对所述第二消息进行处理,并向所述第一层节点返回处理结果;所述第一处理单元还设置为在所述处理结果为处理失败的情况下,获取存储的所述第一消息,并重新对所述第一消息进行处理。According to another embodiment of the present invention, a message processing apparatus is provided, including: a first storage unit, disposed on a first layer node, configured to receive a first message, and store the first message, the first The first layer node includes one or more first nodes; the first processing unit is disposed on the first layer node, configured to process the first message, generate a second message, and send the second message to the second layer node The second message, wherein the second layer node includes one or more second nodes, each of the first layer nodes corresponds to one or more second nodes; and the second processing unit, Provided on the second layer node, configured to receive the second message, process the second message, and return a processing result to the first layer node; the first processing unit is further configured to If the processing result is that the processing fails, the stored first message is obtained, and the first message is processed again.
在本发明实施例中,所述装置还包括:第一记录单元,设置在所述第一层节点上,设置 为在第一层节点接收第一消息,并存储所述第一消息之后,添加对所述第一消息的记录;其中,所述第一处理单元包括:获取模块,设置为查询所述记录,获取存储的所述第一消息。In the embodiment of the present invention, the device further includes: a first recording unit, disposed on the first layer node, and configured Adding a record of the first message after receiving the first message at the first layer node, and storing the first message; wherein the first processing unit includes: an obtaining module, configured to query the record, Obtaining the stored first message.
在本发明实施例中,所述装置还包括:第二存储单元,设置在根节点上,设置为在第一层节点接收第一消息,并存储所述第一消息之前,将接收到的数据封装成多个所述第一消息,存储所述多个所述第一消息;第二记录单元,设置在所述根节点上,设置为添加多个所述第一消息的记录。In the embodiment of the present invention, the device further includes: a second storage unit, configured on the root node, configured to receive the first message before the first layer node, and store the received data before storing the first message Encapsulating into the plurality of the first messages, storing the plurality of the first messages; the second recording unit, disposed on the root node, is configured to add a plurality of records of the first message.
在本发明实施例中,所述装置还包括:发送单元,设置在所述根节点上,设置为向所述第一层节点发送所述第一消息,启动定时器开始计时;确定单元,设置在所述根节点上,设置为在所述定时器到期前接收到所述第一层节点返回的处理成功的消息,则确定所述第一消息处理成功;所述发送单元还设置为在接收到所述第一层节点返回的处理失败的消息,或者,在所述定时器到期前未接收到所述第一层节点返回的处理成功的消息,则查询处理失败的第一消息的记录,获取查询到的第一消息,重新将向所述第一层节点发送获取到的第一消息。In the embodiment of the present invention, the device further includes: a sending unit, configured to be sent on the root node, configured to send the first message to the first layer node, start a timer to start timing; determine a unit, set Setting, on the root node, a message that the processing returned by the first layer node is successful before the timer expires, determining that the first message processing is successful; the sending unit is further configured to be in Receiving a message that the processing returned by the first layer node fails, or not receiving a message that the processing returned by the first layer node is successful before the timer expires, and querying the first message that the processing fails. Recording, obtaining the first message that is queried, and resending the first message obtained to the first layer node.
在本发明实施例中,所述第一处理单元还设置为在重新对所述第一消息进行处理之后,重新生成第二消息,并向第二层节点发送重新生成的第二消息;其中,所述装置还包括:第一返回单元,设置在所述第一层节点上,设置为在所述重新生成的第二消息的处理结果仍为处理失败的情况下,向所述根节点返回所述第一消息处理失败的消息。In the embodiment of the present invention, the first processing unit is further configured to: after reprocessing the first message, regenerate the second message, and send the regenerated second message to the second layer node; The device further includes: a first returning unit, disposed on the first layer node, configured to return to the root node if the processing result of the regenerated second message is still processing failure The message that the first message processing failed.
在本发明实施例中,所述装置还包括:第三存储单元,设置在所述第二层节点上,设置为存储所述第二消息;第三处理单元,设置在所述第二层节点上,设置为对所述第二消息进行处理,生成第三消息,并向第三层节点发送所述第三消息,其中,所述第三层节点包括一个或者多个第三节点,所述第二层节点中的每个第二节点对应一个或者多个第三节点;第四处理单元,设置在所述第三层节点上,设置为接收所述第三消息后,对所述第三消息进行处理,并向所述第二层节点返回处理结果;所述第三处理单元还设置为在所述第三消息的处理结果为处理失败的情况下,所述第二层节点获取存储的所述第二消息,并重新对所述第二消息进行处理,重新生成第三消息,向所述第三层节点发送重新生成的第三消息。In the embodiment of the present invention, the device further includes: a third storage unit, configured to be configured to store the second message on the second layer node; and a third processing unit, configured to be in the second layer node And configured to process the second message, generate a third message, and send the third message to the third layer node, where the third layer node includes one or more third nodes, Each of the second nodes corresponds to one or more third nodes; the fourth processing unit is disposed on the third layer node, and is configured to receive the third message Processing the message, and returning the processing result to the second layer node; the third processing unit is further configured to: when the processing result of the third message is a processing failure, the second layer node acquires the stored The second message, and processing the second message again, regenerating the third message, and sending the regenerated third message to the third layer node.
在本发明实施例中,所述装置还包括:第二返回单元,设置在所述第二层节点上,设置为在所述重新生成的第三消息的处理结果仍为处理失败的情况下,向所述第一层节点返回所述第二消息处理失败的消息。In the embodiment of the present invention, the device further includes: a second returning unit, configured to be disposed on the second layer node, where the processing result of the regenerated third message is still a processing failure, Returning the message that the second message processing failed to the first layer node.
通过在第二层节点对第二消息处理失败的情况下,由第一层节点获取预先存储的第一消息,并重新对第一消息进行处理,以便于重新生成第二消息发送给第二层节点,第二层节点则可以对重新生成的第二消息进行处理,无需从根节点对消息重新进行重复处理,解决了在出现差错的情况下消息处理的效率低的问题,提高了在出现差错的情况下消息处理的效率。In the case that the second layer node fails to process the second message, the first layer node acquires the pre-stored first message, and re-processes the first message, so as to regenerate the second message and send it to the second layer. The node and the second layer node can process the regenerated second message without re-processing the message from the root node, thereby solving the problem that the message processing efficiency is low in the case of an error, and the error is improved. The efficiency of message processing in the case.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中: The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的消息处理方法的流程图;1 is a flow chart of a message processing method according to an embodiment of the present invention;
图2是根据本发明可选实施例的逐层反馈的示意图;2 is a schematic diagram of layer-by-layer feedback in accordance with an alternative embodiment of the present invention;
图3是根据本发明可选实施例的差错重传的示意图;3 is a schematic diagram of error retransmission in accordance with an alternative embodiment of the present invention;
图4是根据本发明实施例的消息处理装置的结构框图。4 is a block diagram showing the structure of a message processing apparatus according to an embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It is to be understood that the terms "first", "second" and the like in the specification and claims of the present invention are used to distinguish similar objects, and are not necessarily used to describe a particular order or order.
在本实施例中提供了一种消息处理方法,该方法可以用于流式计算框架的消息处理。In this embodiment, a message processing method is provided, which can be used for message processing of a streaming computing framework.
图1是根据本发明实施例的消息处方法的流程图,如图1所示,该流程包括如下步骤:FIG. 1 is a flowchart of a method at a message according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
步骤S102,第一层节点接收第一消息,并存储第一消息,第一层节点包括一个或者多个第一节点;Step S102, the first layer node receives the first message, and stores the first message, where the first layer node includes one or more first nodes;
步骤S104,第一层节点对第一消息进行处理,生成第二消息,并向第二层节点发送第二消息,其中,第二层节点包括一个或者多个第二节点,第一层节点中的每个第一节点对应一个或者多个第二节点;Step S104: The first layer node processes the first message, generates a second message, and sends a second message to the second layer node, where the second layer node includes one or more second nodes, and the first layer node Each first node corresponds to one or more second nodes;
步骤S106,第二层节点接收第二消息后,对第二消息进行处理,并向第一层节点返回处理结果;Step S106: After receiving the second message, the second layer node processes the second message, and returns a processing result to the first layer node.
步骤S108,在处理结果为处理失败的情况下,第一层节点获取存储的第一消息,并重新对第一消息进行处理。Step S108: If the processing result is that the processing fails, the first layer node acquires the stored first message, and re-processes the first message.
第一层节点和第二层节点可以是消息处理的中间节点,其中,第二层节点是第一层节点的下游节点。The first layer node and the second layer node may be intermediate nodes of message processing, wherein the second layer node is a downstream node of the first layer node.
通过上述步骤,在第二层节点对第二消息处理失败的情况下,由第一层节点获取预先存储的第一消息,并重新对第一消息进行处理,以便于重新生成第二消息发送给第二层节点,第二层节点则可以对重新生成的第二消息进行处理,无需从根节点对消息重新进行重复处理,解决了在出现差错的情况下消息处理的效率低的问题,提高了在出现差错的情况下消息处理的效率。Through the above steps, in the case that the second layer node fails to process the second message, the first layer node acquires the pre-stored first message, and re-processes the first message, so as to regenerate the second message to be sent to The second layer node, the second layer node can process the regenerated second message, and does not need to re-process the message from the root node, thereby solving the problem that the message processing efficiency is low in the case of an error, and the problem is improved. The efficiency of message processing in the event of an error.
优选地,上述第一节点和第二节点,以及后文所提及的第三节点等等节点均可以是Bolt, 该Bolt是Storm应用中进行消息处理的组件,Bolt可以执行过滤、函数操作、合并、写数据库等任何操作。Preferably, the first node and the second node, and the third node and the like mentioned later may be Bolt. The Bolt is a component of the Storm application for message processing. Bolt can perform any operations such as filtering, function operations, merging, and writing to the database.
优选地,存储第一消息的可以是设置在第一层节点上的消息缓存(Buffer),用于缓存已发送消息,以及用于消息处理失败重传。其中,第二层节点在接收到第二消息时,也可以存储第二消息,以便于其下游节点消息处理失败时,获取存储的第二消息。Preferably, the first message is stored, which may be a message buffer (Buffer) set on the first layer node, used to cache the sent message, and used for message processing failure retransmission. The second layer node may also store the second message when receiving the second message, so as to obtain the stored second message when the downstream node message processing fails.
优选地,在第一层节点接收第一消息,并存储第一消息之后,方法还包括:添加对第一消息的记录;其中,第一层节点获取存储的第一消息包括:第一层节点查询记录,获取存储的第一消息。Preferably, after the first layer node receives the first message and stores the first message, the method further includes: adding a record of the first message; wherein the first layer node acquiring the stored first message comprises: the first layer node Query the record to get the first message stored.
第一层节点在接收到第一消息,并存储第一消息之后,可以添加第一消息的记录,以便于在获取第一消息时,可以基于该记录来获取。进一步优选地,可以利用消息确认模块(Ack模块)为消息添加记录。可选地,Ack模块还可以向上游消息源反馈消息处理情况,接收下游节点反馈消息。After receiving the first message and storing the first message, the first layer node may add a record of the first message, so that when the first message is obtained, it may be acquired based on the record. Further preferably, a message confirmation module (Ack module) can be used to add a record to the message. Optionally, the Ack module may also feed back the message processing situation to the upstream message source and receive the downstream node feedback message.
消息的记录形式可以是按照预先定义的规则所设定的身份标识,例如序列号等,这里不做限定。The record form of the message may be an identity identifier set according to a predefined rule, such as a serial number, etc., which is not limited herein.
优选地,在第一层节点接收第一消息,并存储第一消息之前,方法还包括:根节点将接收到的数据封装成多个第一消息,存储多个第一消息;根节点添加多个第一消息的记录。Preferably, before the first layer node receives the first message and stores the first message, the method further includes: the root node encapsulates the received data into a plurality of first messages, and stores a plurality of first messages; A record of the first message.
本实施例中,根节点可以是Spout,根节点从消息源读取数据,生成独立的消息单元,并将消息转发到若干第一层节点处理,经过第一层节点处理的消息也可能经过其他若干节点处理。根节点可以分别向多个第一层节点中每一个节点发送一个第一消息,并添加相应的记录,以便于第一层节点处理失败时,基于记录从存储的消息中获取相应的消息,重新发送到该第一层节点。In this embodiment, the root node may be a Spout, the root node reads data from the message source, generates an independent message unit, and forwards the message to a plurality of first layer nodes, and the message processed by the first layer node may also pass other Several nodes are processed. The root node may separately send a first message to each of the plurality of first layer nodes, and add a corresponding record, so that when the first layer node fails to process, the corresponding message is obtained from the stored message based on the record, and Sent to the first level node.
优选地,方法还包括:根节点向第一层节点发送第一消息,启动定时器开始计时;在定时器到期前接收到第一层节点返回的处理成功的消息,则确定第一消息处理成功;在接收到第一层节点返回的处理失败的消息,或者,在定时器到期前未接收到第一层节点返回的处理成功的消息,则查询处理失败的第一消息的记录,获取查询到的第一消息,重新将向第一层节点发送获取到的第一消息。Preferably, the method further includes: the root node sends a first message to the first layer node, starts a timer to start timing; and receives a message that the processing returned by the first layer node is successful before the timer expires, and determines the first message processing. Successfully; receiving a message that the processing returned by the first layer node fails, or receiving a message that the processing of the first layer node returns successfully before the expiration of the timer, querying the record of the first message that failed to be processed, and obtaining The first message that is queried will resend the first message obtained to the first layer node.
若根节点在定时器到期内收到发出的消息的处理成功的消息,则表明对应消息处理成功。在定时到期时仍未收到发出消息对应的处理成功的消息或收到处理失败的消息,则从缓存中恢复源数据进行重传。If the root node receives the successful message of the sent message during the timer period, it indicates that the corresponding message processing is successful. When the message that the message is successfully processed or the message that failed the process is received after the timeout expires, the source data is restored from the cache for retransmission.
优选地,第一层节点重新对第一消息进行处理之后,方法还包括:重新生成第二消息,并向第二层节点发送重新生成的第二消息;其中,在重新生成的第二消息的处理结果仍为处理失败的情况下,第一层节点向根节点返回第一消息处理失败的消息。Preferably, after the first layer node re-processes the first message, the method further includes: regenerating the second message, and sending the regenerated second message to the second layer node; wherein, in the regenerated second message If the processing result is still processing failure, the first layer node returns a message that the first message processing fails to the root node.
本实施例中,当第二层节点处理第二消息失败的情况下,重新生成第二消息并向第二层 节点重新发送该重新生成的第二消息,以便于第二层节点对重新进行处理,如果再次处理失败,则第一层节点向根节点返回处理失败的消息。In this embodiment, when the second layer node fails to process the second message, the second message is regenerated and is sent to the second layer. The node resends the regenerated second message so that the second layer node pair reprocesses, and if the processing fails again, the first layer node returns a message that the processing failed to the root node.
优选地,方法还包括:第二层节点存储第二消息;对第二消息进行处理,生成第三消息,并向第三层节点发送第三消息,其中,第三层节点包括一个或者多个第三节点,第二层节点中的每个第二节点对应一个或者多个第三节点;第三层节点接收第三消息后,对第三消息进行处理,并向第二层节点返回处理结果;在第三消息的处理结果为处理失败的情况下,第二层节点获取存储的第二消息,并重新对第二消息进行处理,重新生成第三消息,向第三层节点发送重新生成的第三消息。Preferably, the method further includes: the second layer node stores the second message; processes the second message, generates a third message, and sends a third message to the third layer node, where the third layer node includes one or more a third node, each second node of the second layer node corresponds to one or more third nodes; after receiving the third message, the third layer node processes the third message and returns the processing result to the second layer node If the processing result of the third message is that the processing fails, the second layer node acquires the stored second message, and re-processes the second message, regenerates the third message, and sends the regenerated message to the third layer node. Third message.
若第二层节点的下游还包括第三层节点,那么第二层节点对第二消息进行处理,并生成第三消息,将其发送至第三层节点。在第三层节点对第三消息处理失败的情况下,则由第二层节点获取第二消息,并重新生成第三消息并重传,以便于第三层节点重新处理。这样,当第三层节点处理失败时,无需从根节点开始重复处理,只需从第二层节点重新处理第二消息,大大提高了在出现差错的情况下消息处理的效率。If the second layer node further includes a third layer node, the second layer node processes the second message and generates a third message, which is sent to the third layer node. In the case that the third layer node fails to process the third message, the second layer node acquires the second message, and regenerates the third message and retransmits, so that the third layer node reprocesses. In this way, when the processing of the third layer node fails, it is not necessary to repeat the processing from the root node, and only the second message is reprocessed from the second layer node, which greatly improves the efficiency of message processing in the case of an error.
进一步优选地,方法还包括:在重新生成的第三消息的处理结果仍为处理失败的情况下,第二层节点向第一层节点返回第二消息处理失败的消息。Further preferably, the method further comprises: in the case that the processing result of the regenerated third message is still the processing failure, the second layer node returns a message that the second message processing fails to the first layer node.
如果第三消息重新处理第三消息后,处理结果仍为处理失败,则由第二层节点向第一层节点返回处理失败的消息。这使得在消息处理失败时,通过层层上报,最终才到根节点处。If the processing result is still processing failure after the third message is reprocessed, the second layer node returns a message that the processing fails to the first layer node. This makes it possible to report to the root node when the message processing fails.
下面以具体的应用来介绍本发明实施例。The embodiments of the present invention are described below with specific applications.
Spout从消息源读取数据,生成独立的消息单元,并将消息转发到若干Bolt处理,经过Bolt处理的消息也可能经过其他若干Bolt处理。Spout和Bolt都包含Buffer模块和Ack模块,在消息处理前会将数据缓存在buffer中,并在Ack模块中进行记录。数据处理完成会通过Ack模块向上游数据源反馈处理结果。Spout reads data from the message source, generates a separate message unit, and forwards the message to several Bolt processes. The Bolt-processed message may also be processed by several other Bolts. Both Spout and Bolt contain the Buffer module and the Ack module. The data is buffered in the buffer before the message is processed and recorded in the Ack module. After the data processing is completed, the processing result is fed back to the upstream data source through the Ack module.
流式处理框架的消息处理方法包括以下步骤:The message processing method of the streaming framework includes the following steps:
第一步:first step:
Spout处理源数据,向下游Bolt分发由源数据生成的消息。将生成的消息存入缓存buffer并启动定时器,Spout中的Ack模块为消息添加记录。The Spout processes the source data and distributes the message generated by the source data to the downstream Bolt. The generated message is stored in the buffer buffer and the timer is started. The Ack module in Spout adds a record to the message.
第二步:The second step:
Bolt接收上游消息,处理数据。若Bolt仍然有下游模块,则Ack模块记录待发送消息,并将上游消息存入缓存。反之,则在数据处理完成之后Ack模块向上游反馈ack_msg消息表明消息处理成功,消息处理失败则反馈fail_msg消息。Bolt receives upstream messages and processes the data. If the Bolt still has a downstream module, the Ack module records the message to be sent and stores the upstream message in the cache. On the contrary, after the data processing is completed, the Ack module feeds back the ack_msg message to the upstream to indicate that the message processing is successful, and the message processing fails to feed back the fail_msg message.
第三步:third step:
Bolt接收到某条消息对应的所有下游Bolt反馈的ack_msg消息后,删除缓存中的该条消 息并向上游Bolt或者Spout反馈ack消息。若接收到fail消息则从缓存中恢复对应的消息,重新处理。After receiving the ack_msg message of all downstream Bolt feedback corresponding to a message, Bolt deletes the strip in the cache. And feed back ack messages to the upstream Bolt or Spout. If a fail message is received, the corresponding message is restored from the cache and reprocessed.
第四步:the fourth step:
若Spout在定时器到期内收到发出的消息的ack消息,则表明对应消息处理成功。在定时到期时仍未收到发出消息对应的ack消息或收到fail消息,则从缓存中恢复源数据进行重传。If Spout receives the ack message of the sent message within the period of the timer, it indicates that the corresponding message is processed successfully. When the ack message corresponding to the outgoing message is received or the fail message is received at the time of expiration, the source data is restored from the cache for retransmission.
具体地,上述步骤可以通过以下方式实现:Specifically, the above steps can be implemented in the following manner:
对于第一步:For the first step:
Spout将收集到的数据封装为若干消息Tuple,如图2生成id号分别为msg_0,msg_1的消息,发送Tuple到Bolt,启动定时器开始计时。Spout encapsulates the collected data into a number of messages Tuple. As shown in Figure 2, the messages with the id numbers msg_0 and msg_1 are generated, and the Tuple is sent to the Bolt to start the timer.
Spout将待发送的Tuple缓存到自身的buffer,ack为消息添加记录。记录格式为(msg_0),(msg_1)。Spout caches the tuple to be sent to its own buffer, and ack adds a record to the message. The record format is (msg_0), (msg_1).
对于第二步:For the second step:
Bolt接受来自上游Bolt或者Spout的消息Tuple,序列号为parent_id,缓存数据,并对数据进行处理。处理结果分为两种情况:生成新的Tuple,或者处理完不生成新的Tuple。Bolt accepts the message Tuple from the upstream Bolt or Spout, serial number is parent_id, caches the data, and processes the data. The processing result is divided into two cases: generating a new Tuple, or not generating a new Tuple after processing.
针对第一种情况,在处理来自上游组件的消息成功之后,Bolt中的Ack模块添加记录(parent_id,msg_id),并将来自上游的消息存入缓存。其中的parent_id表示上游发送到Bolt处理的Tuple的id号,Bolt可能由上游Tuple生成多个新的消息,其id号分别为msg_id_1,msg_id_2…msg_id_n。将记录中的msg_id更新为各消息id号之间的异或值,即msg_id=msg_id_1^msg_id_2…^msg_id_i^…^msg_id_n,msg_id_i为各消息的id号,均为64位随机序列。消息记录通常采用HashMap等数据结构实现。For the first case, after processing the message from the upstream component successfully, the Ack module in Bolt adds the record (parent_id, msg_id) and stores the message from the upstream into the cache. The parent_id indicates the id number of the Tuple sent upstream to the Bolt. The Bolt may generate multiple new messages from the upstream Tuple. The id numbers are msg_id_1, msg_id_2...msg_id_n. The msg_id in the record is updated to an exclusive OR value between each message id number, that is, msg_id=msg_id_1^msg_id_2...^msg_id_i^...^msg_id_n, and msg_id_i is the id number of each message, which are all 64-bit random sequences. Message records are usually implemented using data structures such as HashMap.
如图2中Spout下游的两个Bolt,分别处理id为msg_0、msg_1的消息,生成消息msg_2、msg_3、msg_4,并向各自的缓存中添加记录(msg_0,msg_2^msg_3),(msg_1,msg_4)。若处理消息失败则向上游组件反馈处理失败消息fail_msg,fail_msg中包含了处理失败的消息的id号。As shown in Figure 2, two Bolts downstream of Spout process messages with id msg_0 and msg_1, generate messages msg_2, msg_3, and msg_4, and add records to their respective caches (msg_0, msg_2^msg_3), (msg_1, msg_4). . If the message fails to be processed, the processing failure message fail_msg is fed back to the upstream component, and the id number of the message that failed to be processed is included in the fail_msg.
消息的确认采用异或算法:The confirmation of the message uses the XOR algorithm:
上游组件处理id号为parent_id的消息,并由此生成id号分别为msg_id_1,msg_id_2,…,msg_id_n的消息,将生成的消息分发到下游组件处理,并添加消息记录(parent_id,msg_id_1^msg_id_2…^msg_id_n)。下游组件对msg_id_i处理完成之后会向上游反馈(parent_id,msg_id_i),上游查找到parent_id对应的记录msg_id=msg_id_1^msg_id_2…^msg_id_n,将msg_id与msg_id_i进行异或,结果赋给msg_id。所有消息都处理完成之后,异或结果为0,以此判断parent_id消息产生的消息都被处理。The upstream component processes the message with the id number parent_id, and generates messages with the id numbers msg_id_1, msg_id_2, ..., msg_id_n, distributes the generated message to the downstream component for processing, and adds the message record (parent_id, msg_id_1^msg_id_2...^ Msg_id_n). After the processing of the msg_id_i is completed, the downstream component feeds back to the upstream (parent_id, msg_id_i), and upstream finds the record corresponding to the parent_id msg_id=msg_id_1^msg_id_2...^msg_id_n, XOR_id and msg_id_i, and assigns the result to msg_id. After all messages have been processed, the XOR result is 0, so that the message generated by the parent_id message is processed.
第二种情况,处理完Tuple不生成新消息的Bolt,会发送确认消息ack_msg或者失败消息fail_msg到parent_id的消息源,确认消息数据部分的格式为(parent_id,msg_id)。 In the second case, after processing the Bolt that does not generate a new message, the acknowledgment message ack_msg or the failure message fail_msg is sent to the message source of the parent_id, and the format of the message data part is confirmed as (parent_id, msg_id).
如图2中的最后一层的Bolt,处理消息msg_2,msg_3,msg_4完成之后分别向上游反馈ack_msg消息,表明各自消息处理完成。As shown in the last layer of Bolt in FIG. 2, after processing the messages msg_2, msg_3, and msg_4, the ack_msg message is respectively fed back to the upstream, indicating that the respective message processing is completed.
对于第三步:For the third step:
Bolt或Spout接收到来自下游Bolt的确认消息ack_msg后,Ack模块查询ack消息中parent_id所对应的记录,并将记录与ack_msg的msg_id进行异或。异或结果为0则表示parent_id所对应的消息已经完全处理,继续向上游反馈parent_id消息处理完毕。After Bolt or Spout receives the acknowledgement message ack_msg from the downstream Bolt, the Ack module queries the record corresponding to the parent_id in the ack message, and XORs the record with the msg_id of ack_msg. If the XOR result is 0, it indicates that the message corresponding to the parent_id has been completely processed, and the feedback of the parent_id message to the upstream is continued.
如图2中Spout下游Bolt收到确认消息之后,找到消息记录(msg_0,msg_2^msg_3)将记录的值msg_2^msg_3与收到的确认消息中的值msg_2,msg_3分别进行异或,得到的结果为0,则表明消息msg_0处理成功,删除msg_0的缓存。同理将记录(msg_1,msg_4)中的msg_4与下游ack_msg消息中的值msg_4进行异或,得到结果为0,则表明msg_1处理完成。After the Bolt downstream of the Spout receives the confirmation message in Figure 2, the message record (msg_0, msg_2^msg_3) is found, and the recorded value msg_2^msg_3 is XORed with the values msg_2 and msg_3 in the received confirmation message, respectively. If it is 0, it indicates that the message msg_0 is processed successfully, and the cache of msg_0 is deleted. Similarly, the msg_4 in the record (msg_1, msg_4) is XORed with the value msg_4 in the downstream ack_msg message, and the result is 0, indicating that the msg_1 process is completed.
若Bolt或Spout接收到来自下游Bolt的处理失败消息fail_msg,从缓存中恢复处理失败的消息重新处理重传。若下游继续返回fail_msg,则停止重传,继续向上游反馈fail_msg消息。If Bolt or Spout receives the processing failure message fail_msg from the downstream Bolt, the message that failed processing is restored from the cache to reprocess the retransmission. If the downstream continues to return fail_msg, the retransmission is stopped, and the fail_msg message is continuously fed back to the upstream.
具体过程如图3所示,msg_2处理失败,发送fail_msg消息到Bolt,Bolt查询记录,从缓存恢复消息msg_0进行重新处理,生成消息msg_2、msg_3并分别进行重发。下游组件继续重新处理msg_2、msg_3,处理成功逐层向上反馈。The specific process is shown in Figure 3. The msg_2 processing fails, the fail_msg message is sent to the Bolt, and the Bolt query record is reprocessed from the cache recovery message msg_0, and the messages msg_2 and msg_3 are generated and retransmitted separately. The downstream component continues to reprocess msg_2 and msg_3, and the processing succeeds in layer-by-layer feedback.
对于第四步:For the fourth step:
各Bolt组件重复上述过程,不断向上游反馈处理结果,直到Spout接收到来自下游Bolt的反馈消息,收到ack_msg则表明消息处理成功。Each Bolt component repeats the above process, and continuously feeds back the processing result to the upstream until Spout receives the feedback message from the downstream Bolt, and receiving ack_msg indicates that the message processing is successful.
即图2中Spout下游的Bolt分别收到所有消息的确认信号之后向Spout发送ack_msg,Spout收到消息确认消息被处理完毕,删除缓存。That is, the Bolt downstream of the Spout in FIG. 2 receives the acknowledgment signal of all the messages and sends ack_msg to the Spout, and the Spout receives the message confirming that the message is processed and deletes the cache.
在等待时间T之内,如果Spout未收到消息的ack_msg,或者接受到下游反馈的fail_msg消息,则表示该消息处理失败,从buffer中恢复对应的消息进行重传或者放弃。Within the waiting time T, if Spout does not receive the ack_msg of the message, or receives the fail_msg message of the downstream feedback, it indicates that the message processing fails, and the corresponding message is restored from the buffer for retransmission or abandonment.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
本实施例与现有方案相比,通过逐层反馈的方式保证消息可靠性,降低了因为确认节点Acker数量无法动态调整造成的负载过大或者节点闲置。同时每层的处理节点设有缓存,减少了出现差错的情况下消息重发和重新处理的次数。提升了网络效率,降低网络开销。Compared with the existing solution, the embodiment ensures the reliability of the message by means of layer-by-layer feedback, and reduces the overload or the node idle because the number of Acker nodes cannot be dynamically adjusted. At the same time, the processing nodes of each layer are provided with a cache, which reduces the number of times of message retransmission and reprocessing in the event of an error. Improve network efficiency and reduce network overhead.
在本实施例中还提供了一种消息处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“单元”、“模块”可以实现预定功能的 软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In the embodiment, a message processing device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again. As used hereinafter, the terms "unit", "module" may perform a predetermined function. A combination of software and/or hardware. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图4是根据本发明实施例的消息处理装置的结构框图,如图4所示,该装置包括:第一存储单元202、第一处理单元204和第二处理单元206。4 is a structural block diagram of a message processing apparatus according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes: a first storage unit 202, a first processing unit 204, and a second processing unit 206.
第一存储单元202设置在第一层节点上,设置为接收第一消息,并存储第一消息。第一层节点包括一个或者多个第一节点。The first storage unit 202 is disposed on the first layer node, configured to receive the first message, and store the first message. The first layer node includes one or more first nodes.
第一处理单元204设置在第一层节点上,设置为对第一消息进行处理,生成第二消息,并向第二层节点发送第二消息。其中,第二层节点包括一个或者多个第二节点,第一层节点中的每个第一节点对应一个或者多个第二节点。The first processing unit 204 is disposed on the first layer node, configured to process the first message, generate a second message, and send the second message to the second layer node. The second layer node includes one or more second nodes, and each of the first layer nodes corresponds to one or more second nodes.
第二处理单元206设置在第二层节点上,设置为接收第二消息后,对第二消息进行处理,并向第一层节点返回处理结果。The second processing unit 206 is disposed on the second layer node, and is configured to process the second message after receiving the second message, and return the processing result to the first layer node.
第一处理单元204还设置为在处理结果为处理失败的情况下,获取存储的第一消息,并重新对第一消息进行处理。The first processing unit 204 is further configured to acquire the stored first message and reprocess the first message if the processing result is a processing failure.
第一层节点包含的第一节点和第二层节点包含的第二节点可以是消息处理的中间节点,其中,第二层节点是第一层节点的下游节点。The first node included in the first layer node and the second node included in the second layer node may be intermediate nodes of message processing, wherein the second layer node is a downstream node of the first layer node.
通过上述步骤,在第二层节点对第二消息处理失败的情况下,由第一层节点获取预先存储的第一消息,并重新对第一消息进行处理,以便于重新生成第二消息发送给第二层节点,第二层节点则可以对重新生成的第二消息进行处理,无需从根节点对消息重新进行重复处理,解决了在出现差错的情况下消息处理的效率低的问题,提高了在出现差错的情况下消息处理的效率。Through the above steps, in the case that the second layer node fails to process the second message, the first layer node acquires the pre-stored first message, and re-processes the first message, so as to regenerate the second message to be sent to The second layer node, the second layer node can process the regenerated second message, and does not need to re-process the message from the root node, thereby solving the problem that the message processing efficiency is low in the case of an error, and the problem is improved. The efficiency of message processing in the event of an error.
优选地,上述第一层节点和第二层节点,以及后文所提及的第三层节点等等节点均可以是Bolt,该Bolt是Storm应用中进行消息处理的组件,Bolt可以执行过滤、函数操作、合并、写数据库等任何操作。Preferably, the first layer node and the second layer node, and the third layer node and the like mentioned later may all be Bolt, which is a component for message processing in the Storm application, and the Bolt may perform filtering, Function operations, merges, writes to the database, and so on.
优选地,装置还包括:第一记录单元,设置在第一层节点上,设置为在第一层节点接收第一消息,并存储第一消息之后,添加对第一消息的记录;其中,第一处理单元包括:获取模块,设置为查询记录,获取存储的第一消息。Preferably, the device further includes: a first recording unit, disposed on the first layer node, configured to: after receiving the first message at the first layer node, and storing the first message, adding a record of the first message; A processing unit includes: an acquisition module configured to query the record to obtain the stored first message.
第一层节点在接收到第一消息,并存储第一消息之后,可以添加第一消息的记录,以便于在获取第一消息时,可以基于该记录来获取。第一记录单元可以是消息确认模块(Ack模块),用于为消息添加记录。消息的记录形式可以是按照预先定义的规则所设定的身份标识,例如序列号等,这里不做限定。After receiving the first message and storing the first message, the first layer node may add a record of the first message, so that when the first message is obtained, it may be acquired based on the record. The first recording unit may be a message confirmation module (Ack module) for adding a record to the message. The record form of the message may be an identity identifier set according to a predefined rule, such as a serial number, etc., which is not limited herein.
优选地,装置还包括:第二存储单元,设置在根节点上,设置为在第一层节点接收第一消息,并存储第一消息之前,将接收到的数据封装成多个第一消息,存储多个第一消息;第二记录单元,设置在根节点上,设置为添加多个第一消息的记录。 Preferably, the device further includes: a second storage unit, disposed on the root node, configured to encapsulate the received data into a plurality of first messages before the first layer node receives the first message and stores the first message, Storing a plurality of first messages; a second recording unit, disposed on the root node, configured to add a record of the plurality of first messages.
本实施例中,根节点可以是Spout,根节点从消息源读取数据,生成独立的消息单元,并将消息转发到若干第一层节点处理,经过第一层节点处理的消息也可能经过其他若干节点处理。根节点可以分别向多个第一层节点中每一个节点发送一个第一消息,并添加相应的记录,以便于第一层节点处理失败时,基于记录从存储的消息中获取相应的消息,重新发送到该第一层节点。In this embodiment, the root node may be a Spout, the root node reads data from the message source, generates an independent message unit, and forwards the message to a plurality of first layer nodes, and the message processed by the first layer node may also pass other Several nodes are processed. The root node may separately send a first message to each of the plurality of first layer nodes, and add a corresponding record, so that when the first layer node fails to process, the corresponding message is obtained from the stored message based on the record, and Sent to the first level node.
优选地,装置还包括:发送单元,设置在根节点上,设置为向第一层节点发送第一消息,启动定时器开始计时;确定单元,设置在根节点上,设置为在定时器到期前接收到第一层节点返回的处理成功的消息,则确定第一消息处理成功;发送单元还设置为在接收到第一层节点返回的处理失败的消息,或者,在定时器到期前未接收到第一层节点返回的处理成功的消息,则查询处理失败的第一消息的记录,获取查询到的第一消息,重新将向第一层节点发送获取到的第一消息。Preferably, the device further comprises: a sending unit, configured on the root node, configured to send a first message to the first layer node, start a timer to start timing; determine a unit, set on the root node, and set to expire at the timer Before receiving the message of successful processing returned by the first layer node, it is determined that the first message processing is successful; the sending unit is further configured to receive the message that the processing returned by the first layer node fails, or before the timer expires After receiving the message that the processing of the first layer node is successful, the queried first message of the processing failure is obtained, and the first message that is queried is obtained, and the obtained first message is sent to the first layer node again.
若根节点在定时器到期内收到发出的消息的处理成功的消息,则表明对应消息处理成功。在定时到期时仍未收到发出消息对应的处理成功的消息或收到处理失败的消息,则从缓存中恢复源数据进行重传。If the root node receives the successful message of the sent message during the timer period, it indicates that the corresponding message processing is successful. When the message that the message is successfully processed or the message that failed the process is received after the timeout expires, the source data is restored from the cache for retransmission.
优选地,第一处理单元还设置为在重新对第一消息进行处理之后,重新生成第二消息,并向第二层节点发送重新生成的第二消息;其中,装置还包括:第一返回单元,设置在第一层节点上,设置为在重新生成的第二消息的处理结果仍为处理失败的情况下,向根节点返回第一消息处理失败的消息。Preferably, the first processing unit is further configured to: after reprocessing the first message, regenerate the second message, and send the regenerated second message to the second layer node; wherein the device further comprises: the first return unit And being set on the first layer node, and being set to return a message that the first message processing fails to the root node if the processing result of the regenerated second message is still processing failure.
本实施例中,当第二层节点处理第二消息失败的情况下,重新生成第二消息并向第二层节点重新发送该重新生成的第二消息,以便于第二层节点对重新进行处理,如果再次处理失败,则第一层节点向根节点返回处理失败的消息。In this embodiment, when the second layer node fails to process the second message, the second message is regenerated and the regenerated second message is resent to the second layer node, so that the second layer node reprocesses If the processing fails again, the first layer node returns a message that the processing failed to the root node.
优选地,装置还包括:第三存储单元,设置在第二层节点上,设置为存储第二消息;第三处理单元,设置在第二层节点上,设置为对第二消息进行处理,生成第三消息,并向第三层节点发送第三消息;第四处理单元,设置在第三层节点上,设置为接收第三消息后,对第三消息进行处理,并向第二层节点返回处理结果;第三处理单元还设置为在第三消息的处理结果为处理失败的情况下,第二层节点获取存储的第二消息,并重新对第二消息进行处理,重新生成第三消息,向第三层节点发送重新生成的第三消息。Preferably, the device further includes: a third storage unit, disposed on the second layer node, configured to store the second message; the third processing unit, configured on the second layer node, configured to process the second message to generate a third message, and sending a third message to the third layer node; the fourth processing unit is set on the third layer node, configured to receive the third message, process the third message, and return to the second layer node Processing the result; the third processing unit is further configured to: when the processing result of the third message is that the processing fails, the second layer node acquires the stored second message, and reprocesses the second message to regenerate the third message. The regenerated third message is sent to the layer 3 node.
若第二层节点的下游还包括第三层节点,那么第二层节点对第二消息进行处理,并生成第三消息,将其发送至第三层节点。在第三层节点对第三消息处理失败的情况下,则由第二层节点获取第二消息,并重新生成第三消息并重传,以便于第三层节点重新处理。这样,当第三层节点处理失败时,无需从根节点开始重复处理,只需从第二层节点重新处理第二消息,大大提高了在出现差错的情况下消息处理的效率。If the second layer node further includes a third layer node, the second layer node processes the second message and generates a third message, which is sent to the third layer node. In the case that the third layer node fails to process the third message, the second layer node acquires the second message, and regenerates the third message and retransmits, so that the third layer node reprocesses. In this way, when the processing of the third layer node fails, it is not necessary to repeat the processing from the root node, and only the second message is reprocessed from the second layer node, which greatly improves the efficiency of message processing in the case of an error.
优选地,上述装置还包括:第二返回单元,设置在第二层节点上,设置为在重新生成的第三消息的处理结果仍为处理失败的情况下,向第一层节点返回第二消息处理失败的消息。 Preferably, the apparatus further includes: a second returning unit, disposed on the second layer node, configured to return the second message to the first layer node if the processing result of the regenerated third message is still processing failure Handling failed messages.
如果第三消息重新处理第三消息后,处理结果仍为处理失败,则由第二层节点向第一层节点返回处理失败的消息。这使得在消息处理失败时,通过层层上报,最终才到根节点处。If the processing result is still processing failure after the third message is reprocessed, the second layer node returns a message that the processing fails to the first layer node. This makes it possible to report to the root node when the message processing fails.
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:Embodiments of the present invention also provide a storage medium. Optionally, in the embodiment, the foregoing storage medium may be configured to store program code for performing the following steps:
步骤S1,第一层节点接收第一消息,并存储第一消息;Step S1, the first layer node receives the first message, and stores the first message;
步骤S2,第一层节点对第一消息进行处理,生成第二消息,并向第二层节点发送第二消息;Step S2: The first layer node processes the first message, generates a second message, and sends a second message to the second layer node;
步骤S3,第二层节点接收第二消息后,对第二消息进行处理,并向第一层节点返回处理结果;Step S3: After receiving the second message, the second layer node processes the second message, and returns a processing result to the first layer node.
步骤S4,在处理结果为处理失败的情况下,第一层节点获取存储的第一消息,并重新对第一消息进行处理。In step S4, if the processing result is that the processing fails, the first layer node acquires the stored first message and re-processes the first message.
通过上述代码,在第二层节点对第二消息处理失败的情况下,由第一层节点获取预先存储的第一消息,并重新对第一消息进行处理,以便于重新生成第二消息发送给第二层节点,第二层节点则可以对重新生成的第二消息进行处理,无需从根节点对消息重新进行重复处理,解决了在出现差错的情况下消息处理的效率低的问题,提高了在出现差错的情况下消息处理的效率。With the above code, in the case that the second layer node fails to process the second message, the first layer node acquires the pre-stored first message, and re-processes the first message, so as to regenerate the second message to be sent to The second layer node, the second layer node can process the regenerated second message, and does not need to re-process the message from the root node, thereby solving the problem that the message processing efficiency is low in the case of an error, and the problem is improved. The efficiency of message processing in the event of an error.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory. A variety of media that can store program code, such as a disc or a disc.
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行:第一层节点接收第一消息,并存储第一消息;第一层节点对第一消息进行处理,生成第二消息,并向第二层节点发送第二消息;第二层节点接收第二消息后,对第二消息进行处理,并向第一层节点返回处理结果;在处理结果为处理失败的情况下,第一层节点获取存储的第一消息,并重新对第一消息进行处理。Optionally, in this embodiment, the processor executes, according to the stored program code in the storage medium, the first layer node receives the first message, and stores the first message; the first layer node processes the first message to generate The second message sends a second message to the second layer node; after receiving the second message, the second layer node processes the second message and returns the processing result to the first layer node; if the processing result is a processing failure Next, the first layer node obtains the stored first message and re-processes the first message.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。For example, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional embodiments, and details are not described herein again.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不设置为限制本发明,对于本领域的技术人 员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and is a person skilled in the art. The invention is susceptible to various modifications and changes. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
本发明提供的上述技术方案,可以应用于消息处理过程中,通过在第二层节点对第二消息处理失败的情况下,由第一层节点获取预先存储的第一消息,并重新对第一消息进行处理,以便于重新生成第二消息发送给第二层节点,第二层节点则可以对重新生成的第二消息进行处理,无需从根节点对消息重新进行重复处理,解决了在出现差错的情况下消息处理的效率低的问题,提高了在出现差错的情况下消息处理的效率。 The foregoing technical solution provided by the present invention can be applied to a message processing process. When the second layer node fails to process the second message, the first layer node acquires the pre-stored first message, and re-pairs the first message. The message is processed, so that the second message is regenerated and sent to the second layer node, and the second layer node can process the regenerated second message without re-processing the message from the root node, thereby solving the error. The problem of low efficiency of message processing improves the efficiency of message processing in the event of an error.

Claims (14)

  1. 一种消息处理方法,包括:A message processing method includes:
    第一层节点接收第一消息,并存储所述第一消息,所述第一层节点包括一个或者多个第一节点;The first layer node receives the first message, and stores the first message, where the first layer node includes one or more first nodes;
    所述第一层节点对所述第一消息进行处理,生成第二消息,并向第二层节点发送所述第二消息,其中,所述第二层节点包括一个或者多个第二节点,所述第一层节点中的每个第一节点对应一个或者多个第二节点;The first layer node processes the first message, generates a second message, and sends the second message to the second layer node, where the second layer node includes one or more second nodes, Each of the first nodes of the first layer node corresponds to one or more second nodes;
    所述第二层节点接收所述第二消息后,对所述第二消息进行处理,并向所述第一层节点返回处理结果;After receiving the second message, the second layer node processes the second message, and returns a processing result to the first layer node;
    在所述处理结果为处理失败的情况下,所述第一层节点获取存储的所述第一消息,并重新对所述第一消息进行处理。If the processing result is that the processing fails, the first layer node acquires the stored first message, and re-processes the first message.
  2. 根据权利要求1所述的方法,其中,The method of claim 1 wherein
    在第一层节点接收第一消息,并存储所述第一消息之后,所述方法还包括:添加对所述第一消息的记录;After the first layer node receives the first message and stores the first message, the method further includes: adding a record of the first message;
    其中,所述第一层节点获取存储的所述第一消息包括:所述第一层节点查询所述记录,获取存储的所述第一消息。The obtaining, by the first layer node, the stored first message includes: the first layer node querying the record, and acquiring the stored first message.
  3. 根据权利要求1所述的方法,其中,在第一层节点接收第一消息,并存储所述第一消息之前,所述方法还包括:The method of claim 1, wherein before the first layer node receives the first message and stores the first message, the method further comprises:
    根节点将接收到的数据封装成多个所述第一消息,存储所述多个所述第一消息;The root node encapsulates the received data into a plurality of the first messages, and stores the plurality of the first messages;
    所述根节点添加多个所述第一消息的记录。The root node adds a plurality of records of the first message.
  4. 根据权利要求3所述的方法,其中,所述方法还包括:The method of claim 3, wherein the method further comprises:
    所述根节点向所述第一层节点发送所述第一消息,启动定时器开始计时;Sending, by the root node, the first message to the first layer node, and starting a timer to start timing;
    在所述定时器到期前接收到所述第一层节点返回的处理成功的消息,则确定所述第一消息处理成功;Receiving a message that the processing returned by the first layer node is successful before the expiration of the timer, determining that the first message processing is successful;
    在接收到所述第一层节点返回的处理失败的消息,或者,在所述定时器到期前未接收到所述第一层节点返回的处理成功的消息,则查询处理失败的第一消息的记录,获取查询到的第一消息,重新将向所述第一层节点发送获取到的第一消息。Receiving a message that the processing returned by the first layer node fails, or not receiving a message that the processing returned by the first layer node is successful before the timer expires, and querying the first message that the processing fails. Recording, obtaining the first message that is queried, and resending the first message obtained to the first layer node.
  5. 根据权利要求3所述的方法,其中,The method of claim 3, wherein
    所述第一层节点重新对所述第一消息进行处理之后,所述方法还包括:重新生成第二消息,并向第二层节点发送重新生成的第二消息;After the first layer node re-processes the first message, the method further includes: regenerating the second message, and sending the regenerated second message to the second layer node;
    其中,在所述重新生成的第二消息的处理结果仍为处理失败的情况下,所述第一层 节点向所述根节点返回所述第一消息处理失败的消息。Wherein, in the case that the processing result of the regenerated second message is still processing failure, the first layer The node returns a message that the first message processing failed to the root node.
  6. 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1 wherein the method further comprises:
    所述第二层节点存储所述第二消息;The second layer node stores the second message;
    对所述第二消息进行处理,生成第三消息,并向第三层节点发送所述第三消息,其中,所述第三层节点包括一个或者多个第三节点,所述第二层节点中的每个第二节点对应一个或者多个第三节点;Processing the second message, generating a third message, and sending the third message to the third layer node, where the third layer node includes one or more third nodes, and the second layer node Each of the second nodes corresponds to one or more third nodes;
    所述第三层节点接收所述第三消息后,对所述第三消息进行处理,并向所述第二层节点返回处理结果;After receiving the third message, the third layer node processes the third message, and returns a processing result to the second layer node;
    在所述第三消息的处理结果为处理失败的情况下,所述第二层节点获取存储的所述第二消息,并重新对所述第二消息进行处理,重新生成第三消息,向所述第三层节点发送重新生成的第三消息。If the processing result of the third message is that the processing fails, the second layer node acquires the stored second message, and re-processes the second message to regenerate the third message. The third layer node sends a regenerated third message.
  7. 根据权利要求6所述的方法,其中,所述方法还包括:The method of claim 6 wherein the method further comprises:
    在所述重新生成的第三消息的处理结果仍为处理失败的情况下,所述第二层节点向所述第一层节点返回所述第二消息处理失败的消息。And in a case that the processing result of the regenerated third message is still a processing failure, the second layer node returns a message that the second message processing fails to the first layer node.
  8. 一种消息处理装置,包括:A message processing device comprising:
    第一存储单元,设置在第一层节点上,设置为接收第一消息,并存储所述第一消息,所述第一层节点包括一个或者多个第一节点;a first storage unit, disposed on the first layer node, configured to receive the first message, and store the first message, where the first layer node includes one or more first nodes;
    第一处理单元,设置在所述第一层节点上,设置为对所述第一消息进行处理,生成第二消息,并向第二层节点发送所述第二消息,其中,所述第二层节点包括一个或者多个第二节点,所述第一层节点中的每个第一节点对应一个或者多个第二节点;a first processing unit, configured to be configured to process the first message, generate a second message, and send the second message to a second layer node, where the second The layer node includes one or more second nodes, each of the first layer nodes corresponding to one or more second nodes;
    第二处理单元,设置在所述第二层节点上,设置为接收所述第二消息后,对所述第二消息进行处理,并向所述第一层节点返回处理结果;a second processing unit, configured to be disposed on the second layer node, configured to process the second message after receiving the second message, and return a processing result to the first layer node;
    所述第一处理单元还设置为在所述处理结果为处理失败的情况下,获取存储的所述第一消息,并重新对所述第一消息进行处理。The first processing unit is further configured to: when the processing result is a processing failure, acquire the stored first message, and re-process the first message.
  9. 根据权利要求8所述的装置,其中,The device according to claim 8, wherein
    所述装置还包括:第一记录单元,设置在所述第一层节点上,设置为在第一层节点接收第一消息,并存储所述第一消息之后,添加对所述第一消息的记录;The device further includes: a first recording unit, disposed on the first layer node, configured to receive the first message after the first layer node, and after adding the first message, adding the first message recording;
    其中,所述第一处理单元包括:获取模块,设置为查询所述记录,获取存储的所述第一消息。 The first processing unit includes: an obtaining module, configured to query the record, and obtain the stored first message.
  10. 根据权利要求8所述的装置,其中,所述装置还包括:The apparatus of claim 8 wherein said apparatus further comprises:
    第二存储单元,设置在根节点上,设置为在第一层节点接收第一消息,并存储所述第一消息之前,将接收到的数据封装成多个所述第一消息,存储所述多个所述第一消息;a second storage unit, configured to be configured on the root node, configured to: before the first layer node receives the first message, and before storing the first message, encapsulate the received data into a plurality of the first messages, and store the a plurality of said first messages;
    第二记录单元,设置在所述根节点上,设置为添加多个所述第一消息的记录。a second recording unit, disposed on the root node, configured to add a plurality of records of the first message.
  11. 根据权利要求10所述的装置,其中,所述装置还包括:The device of claim 10, wherein the device further comprises:
    发送单元,设置在所述根节点上,设置为向所述第一层节点发送所述第一消息,启动定时器开始计时;a sending unit, configured to be sent on the root node, configured to send the first message to the first layer node, and start a timer to start timing;
    确定单元,设置在所述根节点上,设置为在所述定时器到期前接收到所述第一层节点返回的处理成功的消息,则确定所述第一消息处理成功;a determining unit, configured on the root node, configured to receive a message that the processing returned by the first layer node is successful before the timer expires, determining that the first message processing is successful;
    所述发送单元还设置为在接收到所述第一层节点返回的处理失败的消息,或者,在所述定时器到期前未接收到所述第一层节点返回的处理成功的消息,则查询处理失败的第一消息的记录,获取查询到的第一消息,重新将向所述第一层节点发送获取到的第一消息。The sending unit is further configured to: after receiving the message that the processing returned by the first layer node fails, or not receiving the message that the processing returned by the first layer node is successful before the timer expires, Querying the record of the first message that failed to be processed, obtaining the first message that is queried, and resending the first message obtained to the first layer node.
  12. 根据权利要求10所述的装置,其中,The device according to claim 10, wherein
    所述第一处理单元还设置为在重新对所述第一消息进行处理之后,重新生成第二消息,并向第二层节点发送重新生成的第二消息;The first processing unit is further configured to: after reprocessing the first message, regenerate the second message, and send the regenerated second message to the second layer node;
    其中,所述装置还包括:第一返回单元,设置在所述第一层节点上,设置为在所述重新生成的第二消息的处理结果仍为处理失败的情况下,向所述根节点返回所述第一消息处理失败的消息。The device further includes: a first returning unit, disposed on the first layer node, configured to send to the root node if the processing result of the regenerated second message is still processing failure Returning the message that the first message processing failed.
  13. 根据权利要求8所述的装置,其中,所述装置还包括:The apparatus of claim 8 wherein said apparatus further comprises:
    第三存储单元,设置在所述第二层节点上,设置为存储所述第二消息;a third storage unit, disposed on the second layer node, configured to store the second message;
    第三处理单元,设置在所述第二层节点上,设置为对所述第二消息进行处理,生成第三消息,并向第三层节点发送所述第三消息,其中,所述第三层节点包括一个或者多个第三节点,所述第二层节点中的每个第二节点对应一个或者多个第三节点;a third processing unit, configured to be configured to process the second message, generate a third message, and send the third message to the third layer node, where the third message is The layer node includes one or more third nodes, and each of the second layer nodes corresponds to one or more third nodes;
    第四处理单元,设置在所述第三层节点上,设置为接收所述第三消息后,对所述第三消息进行处理,并向所述第二层节点返回处理结果;a fourth processing unit, configured to be configured to receive the third message, process the third message, and return a processing result to the second layer node;
    所述第三处理单元还设置为在所述第三消息的处理结果为处理失败的情况下,所述第二层节点获取存储的所述第二消息,并重新对所述第二消息进行处理,重新生成第三消息,向所述第三层节点发送重新生成的第三消息。The third processing unit is further configured to: when the processing result of the third message is a processing failure, the second layer node acquires the stored second message, and re-processes the second message Regenerating the third message, and transmitting the regenerated third message to the layer 3 node.
  14. 根据权利要求13所述的装置,其中,所述装置还包括:The device of claim 13 wherein said device further comprises:
    第二返回单元,设置在所述第二层节点上,设置为在所述重新生成的第三消息的处 理结果仍为处理失败的情况下,向所述第一层节点返回所述第二消息处理失败的消息。 a second returning unit, disposed on the second layer node, disposed at the location of the regenerated third message If the result of the processing is still the processing failure, the message that the second message processing fails is returned to the first layer node.
PCT/CN2015/096709 2015-07-30 2015-12-08 Message processing method and device WO2017016130A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510460169.XA CN106411684B (en) 2015-07-30 2015-07-30 Message processing method and device
CN201510460169.X 2015-07-30

Publications (1)

Publication Number Publication Date
WO2017016130A1 true WO2017016130A1 (en) 2017-02-02

Family

ID=57884139

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/096709 WO2017016130A1 (en) 2015-07-30 2015-12-08 Message processing method and device

Country Status (2)

Country Link
CN (1) CN106411684B (en)
WO (1) WO2017016130A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815027A (en) * 2018-12-27 2019-05-28 四川驹马科技有限公司 A kind of method and its system for realizing data sequential processes based on Storm-Kafka

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109086390B (en) * 2018-07-27 2022-03-25 北京中关村科金技术有限公司 Method for realizing real-time monitoring of data consistency
CN113783666A (en) * 2020-11-27 2021-12-10 北京京东振世信息技术有限公司 Method and device for processing service

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699599A (en) * 2013-12-13 2014-04-02 华中科技大学 Message reliable processing guarantee method of real-time flow calculating frame based on Storm
CN104092718A (en) * 2013-12-12 2014-10-08 腾讯数码(天津)有限公司 Distributed system and configuration information updating method in distributed system
US20150032729A1 (en) * 2013-07-23 2015-01-29 Salesforce.Com, Inc. Matching snippets of search results to clusters of objects
US20150081389A1 (en) * 2013-05-13 2015-03-19 Webtrends, Inc. Method and system that identify market segments and that facilitate targeted information distribution

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7995491B1 (en) * 2006-04-19 2011-08-09 At&T Intellectual Property Ii, Lp MPLS VPN connectivity alarm storm reduction
CN103701906B (en) * 2013-12-27 2017-06-09 北京奇安信科技有限公司 Distributed real time computation system and its data processing method
CN103853826B (en) * 2014-03-05 2018-05-25 浪潮天元通信信息系统有限公司 A kind of distributed performance data processing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150081389A1 (en) * 2013-05-13 2015-03-19 Webtrends, Inc. Method and system that identify market segments and that facilitate targeted information distribution
US20150032729A1 (en) * 2013-07-23 2015-01-29 Salesforce.Com, Inc. Matching snippets of search results to clusters of objects
CN104092718A (en) * 2013-12-12 2014-10-08 腾讯数码(天津)有限公司 Distributed system and configuration information updating method in distributed system
CN103699599A (en) * 2013-12-13 2014-04-02 华中科技大学 Message reliable processing guarantee method of real-time flow calculating frame based on Storm

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815027A (en) * 2018-12-27 2019-05-28 四川驹马科技有限公司 A kind of method and its system for realizing data sequential processes based on Storm-Kafka

Also Published As

Publication number Publication date
CN106411684B (en) 2020-06-16
CN106411684A (en) 2017-02-15

Similar Documents

Publication Publication Date Title
CN107729366B (en) Universal multi-source heterogeneous large-scale data synchronization system
CN104092718B (en) The update method of configuration information in distributed system and distributed system
CN101656597B (en) Data receiving and transmitting methods and devices and data transmission system
US10601930B2 (en) Lease-based heartbeat protocol method and apparatus
WO2017000666A1 (en) Cluster master node election method and apparatus
CN103971687B (en) Implementation of load balancing in a kind of speech recognition system and device
WO2016127884A1 (en) Message pushing method and device
WO2017016130A1 (en) Message processing method and device
CN111614712B (en) Data verification system, method, device, server and storage medium
JP2010141413A5 (en)
WO2020211629A1 (en) Short link message monitoring method and apparatus based on blockchain
JP2012129751A (en) Receiver and method for processing by receiver
US20200142759A1 (en) Rest gateway for messaging
JP6434021B2 (en) Manage data feeds
CN107172112B (en) Computer file transmission method and device
JP6448320B2 (en) Node, communication method thereof, and computer-readable recording medium
WO2019042032A1 (en) Data transmission method, rlc entity and pdcp entity
US10680974B2 (en) Method and device for monitoring data processing status
WO2015101026A1 (en) Distributed flow processing system fault tolerance method, nodes and system
CN106210159B (en) Domain name resolution method and device
US10674337B2 (en) Method and device for processing operation for device peripheral
WO2016165289A1 (en) Inter-board data processing method and device
US9213750B2 (en) System for and method for data reflow in a stateless system
CN110784518A (en) Static resource acquisition method and device
KR20160128149A (en) Method and terminal for transmitting and receiving data

Legal Events

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

Ref document number: 15899480

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15899480

Country of ref document: EP

Kind code of ref document: A1