CN111181846B - Message transmission method and device and storage medium - Google Patents

Message transmission method and device and storage medium Download PDF

Info

Publication number
CN111181846B
CN111181846B CN201911368520.7A CN201911368520A CN111181846B CN 111181846 B CN111181846 B CN 111181846B CN 201911368520 A CN201911368520 A CN 201911368520A CN 111181846 B CN111181846 B CN 111181846B
Authority
CN
China
Prior art keywords
message
node
routing table
processing
submodule
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911368520.7A
Other languages
Chinese (zh)
Other versions
CN111181846A (en
Inventor
蔺永杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Zhongke Shuguang Storage Technology Co ltd
Original Assignee
Tianjin Zhongke Shuguang Storage Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin Zhongke Shuguang Storage Technology Co ltd filed Critical Tianjin Zhongke Shuguang Storage Technology Co ltd
Priority to CN201911368520.7A priority Critical patent/CN111181846B/en
Publication of CN111181846A publication Critical patent/CN111181846A/en
Application granted granted Critical
Publication of CN111181846B publication Critical patent/CN111181846B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/04Interdomain routing, e.g. hierarchical routing
    • 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/06Message adaptation to terminal or network requirements
    • H04L51/066Format adaptation, e.g. format conversion or compression

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a message transmission method and a device and a storage medium, wherein the method comprises the following steps: after the node receives a message, performing a group packaging operation, wherein the group packaging operation comprises: generating a routing table of operation and filling the routing table into a message header, generating message content and filling the message content into a message body and setting a use domain of the message; after the next target address in the routing table is subjected to offset processing, processing the message, wherein the processing of the message comprises the following steps: and viewing the use domain of the message, and if the node is in the use domain, acquiring the message. Through the technical scheme, the data transmission method and the data transmission device can reduce the transmission consumption of data.

Description

Message transmission method and device and storage medium
Technical Field
The invention relates to a message transmission method and device and a storage medium.
Background
In a conventional storage system, a point-to-point communication method is mostly adopted, and each data request needs to be transmitted by two service data: for the first time, service data is requested from a source end to a destination end; and secondly, responding to the service data from the destination end to the source end. It is appropriate that there are fewer serving nodes in the system.
With the expansion of the storage system, the number of service nodes in the system is increased, and the nodes work cooperatively. There will necessarily be some business operations that require data on multiple nodes. If the method of point-to-point communication is used, excessive data transmission may be caused, for example: an operation is initiated from the A node, and B, C, D, E node data is needed, so that the transmission of the service data needs to have A- > B, B- > A, A- > C, C- > A, A- > D, D- > A, A- > E, E- > A8 steps.
Disclosure of Invention
In view of the foregoing problems in the related art, the present invention provides a message transmission method and apparatus, and a storage medium, which can reduce transmission consumption of data.
The technical scheme of the invention is realized as follows:
according to an aspect of the present invention, there is provided a message transmission method, including:
after the node receives a message, performing a group packaging operation, wherein the group packaging operation comprises: generating a routing table of operation and filling the routing table into a message header, generating message content and filling the message content into a message body and setting a use domain of the message;
after the next target address in the routing table is subjected to offset processing, processing the message, wherein the processing of the message comprises the following steps: and viewing the use domain of the message, and if the node is in the use domain, acquiring the message.
According to an embodiment of the invention, the processing of the message further comprises: after the acquisition of the message is carried out, the mark of the node in the use domain is cleared; and when the use domain of the message is judged to be empty, the message is removed from the message body.
According to the embodiment of the invention, after the processing of the message, the method further comprises the following steps: and when the node is determined to be required to generate the message according to the operation type, adding the node into the message body and setting the use domain.
According to the embodiment of the invention, all the node addresses and the current positions needed to be passed by the operation are included in the routing table.
According to another aspect of the present invention, there is provided a message transmission apparatus including:
the node comprises a group packaging module and a group packaging module, wherein the group packaging module is used for executing group packaging operation after the node receives a message and comprises a first generation submodule and a second generation submodule, the first generation submodule is used for generating a routing table of the operation and filling the routing table into a message header, and the second generation submodule is used for generating message content and filling the message content into a message body and setting a using domain of the message;
and the processing module is used for processing the message after the next target address in the routing table is subjected to offset processing, wherein the processing module comprises a viewing submodule and an acquiring submodule, the viewing submodule is used for viewing the use domain of the message, and the acquiring submodule is used for acquiring the message when the node is in the use domain.
According to an embodiment of the invention, the processing module further comprises: and the clearing submodule is used for clearing the mark of the node in the use domain after the acquisition of the message is carried out, and is also used for clearing the message from the message body when the use domain of the message is judged to be empty.
According to an embodiment of the present invention, further comprising: and the setting submodule is used for adding the node into the message body and setting the use domain when the node is determined to be required to generate the message according to the operation type.
According to the embodiment of the invention, all the node addresses and the current positions needed to be passed by the operation are included in the routing table.
According to another aspect of the present invention, there is provided a storage medium storing a program executed to implement the message transmission method described above.
Through the technical scheme, compared with the traditional transmission mode, in a multi-node environment, when business operation needs processing by a plurality of nodes, the data transmission load in the system can be reduced, and the system pressure is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic diagram of a message structure according to an embodiment of the present invention;
FIG. 2 is a flow chart of a message transmission method according to an embodiment of the present invention;
fig. 3 is a flowchart of a message transmission method according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present invention.
In order to reduce the transmission consumption of data, the scheme of the present invention designs a streaming transmission scheme, and further takes the above operation initiated from node a, which requires B, C, D, E node data operation as an example, so that the transmission flow is a- > B- > C- > D- > E. In order to implement this kind of transmission flow, the present invention firstly provides a multi-node oriented streaming packaging method as shown in fig. 1, and the packaging protocol includes two parts: a message header and a message body. Wherein:
message header: a transmission routing table containing messages, wherein the table contains all node addresses and current positions required to pass the operation;
message body: each message corresponds to a fixed message type, and the message producer can set the scope of the message. Each node can obtain the message content of the designated type from the message body, and can also fill the message content of the designated type into the message body for the use of the later target node in the route.
Based on the above group packaging method, as shown in fig. 1 and fig. 2, according to an embodiment of the present invention, there is provided a message transmission method, which may include the following steps:
s21, after the node receives a message, it performs a group packing operation.
Wherein the group packaging operation comprises: s211, generating a routing table of operation and filling the routing table into a message header, generating message content and filling the message content into a message body and setting a using domain of the message;
s22, the next destination address in the routing table is shifted and then the message is processed.
Wherein, the processing of the message comprises: s221, checking the using domain of the message, and if the node is in the using domain, acquiring the message.
Fig. 3 is a flowchart of a message transmission method according to another embodiment of the present invention. Referring to fig. 1 and fig. 3, in this embodiment, the routing table has a processing path of the whole message, and when the service node receives a message, it first determines whether the routing table is correct, and determines that the message needs to be processed, and then performs offset processing on the next destination address in the routing table.
Then, the message processing is carried out: and checking the use domain of the message, if the node of the message is in the use domain, acquiring the message, clearing the mark of the node of the message in the use domain after acquisition, and clearing the message from the message body if the use domain of the message is empty.
After a service node completes processing, it can decide whether to generate a message for the cost node according to the operation type. If necessary, adding to the message body, and setting the use domain of the message.
Compared with the traditional transmission mode, the technical scheme provided by the invention can reduce the data transmission load in the system and has favorable effect on reducing the system pressure when a plurality of nodes are required to process business operation in a multi-node environment.
According to another aspect of the present invention, there is provided a message transmission apparatus including:
the node comprises a group packaging module and a group packaging module, wherein the group packaging module is used for executing group packaging operation after the node receives a message and comprises a first generation submodule and a second generation submodule, the first generation submodule is used for generating a routing table of the operation and filling the routing table into a message header, and the second generation submodule is used for generating message content and filling the message content into a message body and setting a using domain of the message;
and the processing module is used for processing the message after the next target address in the routing table is subjected to offset processing, wherein the processing module comprises a viewing submodule and an acquiring submodule, the viewing submodule is used for viewing the use domain of the message, and the acquiring submodule is used for acquiring the message when the node is in the use domain.
According to the embodiment of the present invention, the processing module further includes a clearing submodule, where the clearing submodule is configured to clear the flag of the node in the usage domain after the acquisition of the message is performed, and is further configured to clear the message from the message body when it is determined that the usage domain of the message is empty.
According to the embodiment of the invention, the method further comprises a setting submodule, wherein the setting submodule is used for adding the node into the message body and setting the use domain when the node is determined to be required to generate the message according to the operation type.
According to the embodiment of the invention, all the node addresses and the current positions needed to be passed by the operation are included in the routing table.
According to another aspect of the present invention, there is provided a storage medium storing a program executed to implement the message transmission method described above.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (9)

1. A method for message transmission, comprising:
after a node receives a message, performing a group packaging operation, wherein the group packaging operation comprises: generating a routing table of operation and filling the routing table into a message header, generating message content and filling the message content into a message body and setting a using domain of the message, wherein the operation is a service operation needing a plurality of nodes to process;
after the next target address in the routing table is subjected to offset processing, processing a message, wherein the processing of the message comprises: and viewing the use domain of the message, and if the node is in the use domain, acquiring the message.
2. The message transmission method according to claim 1, wherein the processing of the message further comprises:
after the acquisition of the message is carried out, clearing the mark of the node in the use domain;
and when the use domain of the message is judged to be empty, removing the message from the message body.
3. The message transmission method according to claim 1, further comprising, after the processing of the message:
and when the node is determined to be required to generate a message according to the operation type, adding the message of the node into the message body and setting the use domain.
4. The message transmission method according to any of claims 1-3, characterized in that the routing table includes all node addresses and current locations that need to be traversed by the operation.
5. A message transmission apparatus, comprising:
the system comprises a group packaging module and a group packaging module, wherein the group packaging module is used for executing group packaging operation after a node receives a message, and comprises a first generation submodule and a second generation submodule, the first generation submodule is used for generating a routing table of the operation and filling the routing table into a message header, the second generation submodule is used for generating message content and filling the message content into a message body and setting a using domain of the message, and the operation is service operation which needs a plurality of nodes to process;
and the processing module is used for processing the message after the next target address in the routing table is subjected to offset processing, wherein the processing module comprises a viewing submodule and an acquiring submodule, the viewing submodule is used for viewing the use domain of the message, and the acquiring submodule is used for acquiring the message when the node is in the use domain.
6. The message transmission apparatus according to claim 5, wherein the processing module further comprises:
and the clearing submodule is used for clearing the mark of the node in the use domain after the acquisition of the message is carried out, and is also used for clearing the message from the message body when the use domain of the message is judged to be empty.
7. The message transmission apparatus according to claim 5, wherein the processing module further comprises:
and the setting submodule is used for adding the message of the node into the message body and setting the use domain when the node is determined to be required to generate the message according to the operation type.
8. Message transmission means according to any of claims 5-7, characterized in that all node addresses and current locations that need to be traversed by the operation are included in the routing table.
9. A storage medium characterized by storing a program executed to implement the message transmission method according to any one of claims 1 to 4.
CN201911368520.7A 2019-12-26 2019-12-26 Message transmission method and device and storage medium Active CN111181846B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911368520.7A CN111181846B (en) 2019-12-26 2019-12-26 Message transmission method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911368520.7A CN111181846B (en) 2019-12-26 2019-12-26 Message transmission method and device and storage medium

Publications (2)

Publication Number Publication Date
CN111181846A CN111181846A (en) 2020-05-19
CN111181846B true CN111181846B (en) 2022-03-01

Family

ID=70650321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911368520.7A Active CN111181846B (en) 2019-12-26 2019-12-26 Message transmission method and device and storage medium

Country Status (1)

Country Link
CN (1) CN111181846B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355490B (en) * 2007-07-25 2012-05-23 华为技术有限公司 Method, system and node equipment for routing information
US8477787B2 (en) * 2009-11-30 2013-07-02 International Business Machines Corporation Method for routing of messages within a data network
CN107357749B (en) * 2016-05-09 2020-03-17 大唐移动通信设备有限公司 Message processing method and device
CN106878171B (en) * 2016-12-30 2020-03-13 晶赞广告(上海)有限公司 Streaming data processing method and device for multiple data sources
CN110191000B (en) * 2019-06-10 2023-01-31 中汇信息技术(上海)有限公司 Data processing method, message tracking monitoring method and distributed system

Also Published As

Publication number Publication date
CN111181846A (en) 2020-05-19

Similar Documents

Publication Publication Date Title
CN111935315B (en) Block synchronization method and device
US6968393B1 (en) Method and apparatus for an attribute oriented routing update
US20150207736A1 (en) Multi-Domain Source Routed Forwarding Based on Collaborating Network Controllers
CN101841520B (en) Domain name system and information processing method and device for domain name system
CN111510386B (en) Method and device for processing message
CN108600099A (en) A kind of message forwarding method, device and Leaf equipment
CN104243631A (en) Method and device for stateful conversion between IPv4 address and IPv6 address
CN105099944A (en) Data caching method and forwarding device
US11689442B2 (en) Routing in fat tree networks using negative disaggregation advertisements
CN111181846B (en) Message transmission method and device and storage medium
CN113037879A (en) ARP learning method and node equipment
CN103986654A (en) LSP generating method and device
CN104468855A (en) Method and device for processing ARP message
CN101515892B (en) Method for realizing multi-resource processing in peer-to-peer network, equipment and system thereof
CN103716236A (en) Route calculation method based on IS-IS protocol and equipment
CN102916891A (en) Routing method of communication network and routing node
CN107566302A (en) Message forwarding method and device
CN107547684A (en) A kind of IPv6 address distribution methods and device
CN102143246B (en) Method for end-to-end communication between internet protocol version (IPV) 4 network and IPV6 network
CN110290068A (en) A kind of sending method, method of reseptance and the equipment of adhesion label
CN110191055B (en) Label distribution method and device
CN114401382A (en) Machine scheduling method and device and electronic equipment
CN103209128A (en) Datagram and virtual circuit simultaneously supporting data forwarding method and router
CN103684860A (en) System ID managing method and device
CN116827860A (en) SRv6 message transmission method, device, node and storage medium

Legal Events

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