WO2017107963A1 - Message sending and receiving method and apparatus - Google Patents

Message sending and receiving method and apparatus Download PDF

Info

Publication number
WO2017107963A1
WO2017107963A1 PCT/CN2016/111561 CN2016111561W WO2017107963A1 WO 2017107963 A1 WO2017107963 A1 WO 2017107963A1 CN 2016111561 W CN2016111561 W CN 2016111561W WO 2017107963 A1 WO2017107963 A1 WO 2017107963A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
transmitted
key
value
transmission
Prior art date
Application number
PCT/CN2016/111561
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 WO2017107963A1 publication Critical patent/WO2017107963A1/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/234Monitoring or handling of messages for tracking messages

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a message sending and receiving method and apparatus.
  • a message publishing and subscription system There are three roles in the system, namely producer, broker, and consumer. (consumer). The Producer posts a message to a topic, and the consumer subscribes to a topic's message, and once there is a new message about a topic, the broker passes it to the consumer that subscribes to it.
  • the present invention has been made in order to provide a message transmitting and receiving apparatus and a corresponding message transmitting and receiving method that overcome the above problems or at least partially solve or alleviate the above problems.
  • a message sending method including: generating a to-be-transmitted message in a sending device, where the to-be-transmitted message carries a destination address; acquiring related parameters of the to-be-transmitted message, utilizing And the related parameter is used to generate a corresponding identifier ID of the to-be-transmitted message; adding a corresponding identifier ID to the to-be-transmitted message; and transmitting, by using the sending device, the to-be-transmitted message with the added ID to the destination.
  • a message receiving method comprising: receiving a transport message with an identifier ID, wherein the ID is generated according to a related parameter of the transport message; acquiring an ID of the transport message, And parsing to obtain related parameters of the transmission message; and recording an ID of the transmission message and the related parameter in a receiving device.
  • a message sending apparatus which is disposed in a sending device of a message, and includes: a message generating module, configured to generate a message to be transmitted in the sending device, where the to-be-transmitted The message carries a destination address, and the identifier generating module is configured to acquire a related parameter of the to-be-transmitted message, and use the related parameter to generate a corresponding label for the to-be-transmitted message. And an adding module, configured to add a corresponding identification ID to the to-be-transmitted message; and a sending module, configured to send, by using the sending device, the to-be-transmitted message with the added ID to the destination.
  • a message receiving apparatus which is provided in a receiving device of a message, comprising: a receiving module, adapted to receive a transport message with an identifier ID, wherein the ID is according to the transport message Corresponding parameter generation; an obtaining module, configured to acquire an ID of the transmission message, and parse to obtain a related parameter of the transmission message; and a recording module, configured to record an ID of the transmission message and the correlation in a receiving device parameter.
  • a computer program comprising computer readable code, when said computer readable code is run on a computing device, causing said computing device to perform a message transmission as described above , receiving method.
  • the method in the embodiment of the present invention after the message to be transmitted is generated, is not immediately sent to the destination, but uses the relevant parameters of the message to be transmitted to generate an identification ID, and adds the generated ID to the message to be transmitted, so that The ID becomes part of the message to be transmitted, and the message to be transmitted with the ID is sent out. Since the ID has become part of the message to be transmitted, a record of the corresponding ID is generated in each node through which the message to be transmitted passes. The record generated by each node by the ID attached to the message to be transmitted can grasp the delivery path of each transmitted message and understand the delivery status during the transmission of the transmitted message.
  • each node is queried whether there is an ID corresponding to the transmission message, and further determining which node of the transmission message is abnormal, therefore,
  • the method provided by the embodiment of the invention is convenient for the user to quickly find out the node where the abnormal situation occurs during the transmission.
  • FIG. 1 is a schematic flowchart showing a process of a message sending method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart showing the processing of a message receiving method according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a message sending apparatus according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram showing another structure of a message transmitting apparatus according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a message receiving apparatus according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram showing another structure of a message receiving apparatus according to an embodiment of the present invention.
  • FIG. 7 is a block diagram schematically showing a computing device for performing a message transmitting and receiving method according to the present invention.
  • Fig. 8 schematically shows a storage unit for holding or carrying program code implementing the message transmitting and receiving method according to the present invention.
  • FIG. 1 is a flow chart showing the processing of a message transmitting method according to an embodiment of the present invention. Referring to FIG. 1, the method includes at least the following steps S102 to S108.
  • the embodiment of the present invention performs step S102, and generates a to-be-transmitted message in the sending device, where the to-be-transmitted message carries a destination address.
  • step S104 is executed to obtain related parameters of the message to be transmitted, and the corresponding identifier is generated for the message to be transmitted by using the relevant parameter.
  • step S106 is performed, and the corresponding identifier ID is added to the transmission message.
  • step S108 is executed to send the to-be-transmitted message with the added ID to the destination by using the sending device.
  • the message to be transmitted is generated, it is not immediately sent to the destination, but an identifier (ID) is generated by using relevant parameters of the message to be transmitted, and the generated ID is added to the message to be transmitted. , so that the ID becomes part of the message to be transmitted, and then the message to be transmitted with the ID is sent out. Since the ID has become part of the message to be transmitted, so that it is to be transmitted Each node through which the message passes will generate a record of the corresponding ID. The record generated by each node by the ID attached to the message to be transmitted can grasp the delivery path of each transmitted message and understand the delivery status during the transmission of the transmitted message.
  • ID identifier
  • each node is queried whether there is an ID corresponding to the transmission message, and further determining which node of the transmission message is abnormal, therefore,
  • the method provided by the embodiment of the invention is convenient for the user to quickly find out the node where the abnormal situation occurs during the transmission.
  • Each message to be transmitted is unique with respect to other messages to be transmitted, and the ID is equivalent to the identity of the message to be transmitted.
  • each message to be transmitted needs a unique ID, and the The unique related parameter generates a corresponding ID, so that the ID corresponding to each message to be transmitted is also unique.
  • the record added by the ID to be transmitted is unique in the record generated by each node, which is more advantageous for grasping the delivery path of each transmitted message, and understanding the transmission in the process of transmitting the message. status.
  • the ID is generated according to a related parameter of the message to be transmitted, wherein the relevant parameter of the message to be transmitted includes at least one of the following: an IP (Internet Protocol) address of the transmitting device, and a MAC (Media) Access Control, media access control) address, destination address, and send timestamp.
  • IP Internet Protocol
  • MAC Media Access Control, media access control
  • the Internet Protocol address is a unified address format provided by the IP protocol, which assigns a logical address to each network and each host on the Internet.
  • the media access address, or physical address, hardware address is used to define the location of the network device and represents the character of each site on the Internet. It follows that a host will have a unique MAC address, and each network location will have a unique IP address, IP address and MAC address are unique.
  • the embodiment of the present invention generates a corresponding ID with a unique related parameter, for example, an IP address, a MAC address, and a sending time stamp of the sending device.
  • a unique related parameter for example, an IP address, a MAC address, and a sending time stamp of the sending device.
  • the acquired related parameters of the plurality of to-be-transmitted messages are sorted and adjusted by using a preset rule to generate a corresponding ID.
  • the plurality of related parameters include at least one unique related parameter, for example, an IP address, a MAC address, a sending time stamp, and the like of the sending device.
  • the step of generating the ID corresponding to the message to be transmitted is to arrange the plurality of related parameters in a predetermined order, and then setting a spacer and/or an interval field between the related parameters.
  • the relevant parameters of the ID corresponding to the transmission message are the IP address of the sending device and the sending timestamp, where the IP address is 192.168.1.1 and the sending timestamp is 10:00 on December 20, 2015.
  • the predetermined order of the two related parameters of the IP address and the transmission timestamp is the IP address, the transmission timestamp, and a plus sign is set between the two related parameters, and the generated ID is 192.168.1.1+December 20, 2015 10:00. If the sending device generates a new message to be transmitted, the ID of the new message to be transmitted is 192.168.1.1+10:20 on December 20, 2015.
  • the record added by the ID to be transmitted is unique in each node, which is more advantageous for grasping the delivery path of each transmitted message.
  • the number of the plurality of related parameters for generating the ID may be arbitrarily selected, and the interval set between the related parameters may also be a colon, a semicolon, etc.
  • each related parameter included in the ID may also be selected to be set. Fields are connected.
  • the exemplification of the ID corresponding to the message to be transmitted in the embodiment of the present invention is merely an example, and the present invention is not limited in any way.
  • the ID corresponding to the message to be transmitted is generated, it is added to the message to be transmitted. Specifically, a corresponding ID is added to the header of the message to be transmitted, or a corresponding ID is added at the end of the message to be transmitted.
  • the added position of the to-be-transmitted message is performed according to the transmission protocol, so that the receiver can recognize and parse the corresponding ID after receiving the transmission message in the transmission process.
  • the message to be transmitted with the ID is sent out.
  • the relevant parameters of the message to be transmitted are stored in the key-value storage list of the sending device.
  • the key column in the key-value storage list stores the ID of the message to be transmitted
  • the value column in the key-value storage list stores at least a part of the specific value or its related parameter.
  • the key column in the key-value storage list stores the ID of the message to be transmitted.
  • the value column in the key-value storage list may be Stores meaningless specific values (such as 0 ⁇ false ⁇ F) to match the storage format of the key-value storage list.
  • the generated ID includes some related parameters of the message to be transmitted, the value column in the key-value storage list may store related parameters not included in the corresponding ID, or the value column in the key-value storage list may store the corresponding parameter.
  • the relevant parameters not included in the ID the relevant parameters of this part can be selected according to the actual situation. For example, the message to be transmitted includes 10 related parameters.
  • the value column in the key-value storage list can store the corresponding ID without the packet.
  • the 6 related parameters, or the value column in the key-value storage list may store 2 of the 6 related parameters not included in the corresponding ID, wherein the number of related parameters in the embodiment of the present invention is only As a specific example, the invention is not limited at all.
  • the key-value storage list is uploaded to the distributed storage system.
  • the distributed storage system distributes data in multiple independent devices.
  • the distributed network storage system adopts a scalable system structure, which utilizes multiple storage servers to share storage load and locates storage information by using location servers. Increased system reliability, availability and access efficiency, and easy to scale.
  • the sending device If the sending device generates a new to-be-transmitted message, correspondingly, a corresponding ID is generated for the to-be-transmitted message, and after the message to be transmitted with the ID is sent, the related parameters of the sent-to-transmitted message are stored and sent.
  • the device's key-value is stored in the list.
  • the key-value storage list is added to the distributed storage system, and the original key-value of the message to be transmitted is updated by the distributed storage system. Store the list.
  • FIG. 2 is a flow chart showing the processing of a message receiving method according to an embodiment of the present invention. Referring to FIG. 2, the method includes at least the following steps S202 to S206.
  • the embodiment of the present invention performs step S202, and receives a transmission message with an identifier ID, where the ID is generated according to a relevant parameter of the transmission message.
  • step S204 is performed to obtain the ID of the transmission message and parse to obtain related parameters of the transmission message.
  • step S206 is performed to record the ID of the transmission message and related parameters in the receiving device.
  • the receiving device After receiving the transmission message with the ID, acquires the ID of the transmission message, and records the ID of the transmission message, that is, generates a record of the transmission message in the receiving link, so that the user can grasp each transmission message.
  • the delivery path to understand the delivery status during the transmission of the message.
  • the receiving device After the receiving device receives the message to be transmitted with the ID, in a preferred embodiment of the present invention, not only the ID of the transmission message but also the IP address, MAC address, destination address, and transmission of the transmitting device are recorded in the receiving device. Timestamp, and the IP address, MAC address, and receiving timestamp of the receiving device.
  • the key column in the key-value storage list stores the ID of the message to be transmitted
  • the value column in the key-value storage list stores at least a part of the specific value or its related parameter as the storage value.
  • the ID of the message to be transmitted and the related parameters are stored in the key-value storage list of the receiving device, which is equivalent to recording the transmission message at the receiving link.
  • the key column in the key-value storage list of the receiving device stores the ID of the message to be transmitted, in order to save storage space, the key-value is stored in the list.
  • the value column stores a meaningless specific value (for example, 0 ⁇ false ⁇ F) to match the storage format of the key-value storage list.
  • the generated ID includes some related parameters of the message to be transmitted, the value column in the key-value storage list may store related parameters not included in the corresponding ID, or the value column in the key-value storage list may store the corresponding parameter.
  • the relevant parameters not included in the ID the relevant parameters of this part can be selected according to the actual situation. For example, the message to be transmitted includes 10 related parameters.
  • the value column in the key-value storage list can store 6 items not included in the corresponding ID.
  • the related parameter, or the value column in the key-value storage list may store two of the six related parameters that are not included in the corresponding ID, wherein the number of related parameters involved in the embodiment of the present invention is only a specific example. It is to be understood that the invention is not limited in any way.
  • the key-value storage list is uploaded to the distributed storage system. If the receiving device receives the transmission message, correspondingly, the ID and related parameters corresponding to the transmission message are stored in the key-value storage list of the receiving device. The updated key-value storage list is uploaded to the distributed storage system, and the distributed storage system overwrites the receiving device stored thereon, because the information of the ID and related parameters is added to the key-value storage list of the receiving device. The original key-value storage list uploaded.
  • the transmission message is sent from the source address and reaches the destination address.
  • some intermediate links such as routers, are transmitted.
  • the transmission message needs to be parsed and the message will be transmitted. The corresponding ID is recorded.
  • the ID corresponding to the transmission message is recorded in the transmission link, the intermediate link and the receiving link of the transmission message. Through the ID record formed by each link, the transmission path of each transmission message can be grasped, and the transmission path of the transmission message is known. Delivery status.
  • FIG. 3 is a block diagram showing the structure of a message transmitting apparatus according to an embodiment of the present invention.
  • the device at least includes:
  • the message generating module 310 is configured to generate a to-be-transmitted message in the sending device, where the to-be-transmitted message carries a destination address;
  • the identifier generation module 320 is coupled to the message generation module 310, and is configured to acquire related parameters of the message to be transmitted, and generate corresponding identifier IDs for the to-be-transmitted message by using the relevant parameters;
  • the adding module 330 is coupled to the identifier generating module 320, and is adapted to add a corresponding identifier ID to the message to be transmitted;
  • the sending module 340 is coupled to the adding module 330, and is adapted to send, by using the sending device, the to-be-transmitted message with the added ID to the destination.
  • the identifier generating module 320 is further adapted to:
  • the identifier generating module 320 is further adapted to:
  • the obtained related parameters are sorted and adjusted by using a preset rule to generate their corresponding IDs.
  • the identifier generating module 320 is further adapted to:
  • a spacer and/or interval field is set between each relevant parameter.
  • the message sending apparatus further includes:
  • the storage module 350 is coupled to the sending module 340, and is configured to store, in a key-value storage list of the sending device, a related parameter of the message to be transmitted, where the ID of the message to be transmitted is used as a storage key, a specific value or at least a part of a related parameter thereof. As a storage value.
  • the message sending apparatus further includes:
  • the first uploading module 360 is coupled to the storage module 350, and is adapted to upload the updated key-value storage list to the distributed storage system, and the distributed storage system updates the original key-value storage on which the message to be transmitted is stored. List.
  • FIG. 5 is a block diagram showing the structure of a message receiving apparatus according to an embodiment of the present invention.
  • the device includes at least:
  • the receiving module 510 is adapted to receive a transmission message with an identifier ID, where the ID is generated according to a relevant parameter of the transmission message;
  • the obtaining module 520 is coupled to the receiving module 510, and is adapted to obtain an ID of the transport message, and parse to obtain a related parameter of the transport message.
  • the recording module 530 is coupled to the acquisition module 520 and is adapted to record the ID of the transmission message and related parameters in the receiving device.
  • the relevant parameters comprise at least one of the following:
  • the recording module 530 is further adapted to:
  • a related parameter of the message to be transmitted is stored in the key-value storage list in the receiving device, wherein the ID of the message to be transmitted is used as a storage key, and at least a part of the specific value or its related parameter is used as the storage value.
  • the message receiving apparatus further includes:
  • the second uploading module 540 is coupled to the recording module 530, and is adapted to upload the updated key-value storage list to the distributed storage system, and the distributed storage system updates the original key-value storage list on which the transport message is stored. .
  • the message sending and receiving method and apparatus provided by the embodiments of the present invention can achieve the following beneficial effects:
  • the method in the embodiment of the present invention after the message to be transmitted is generated, is not immediately sent to the destination, but uses the relevant parameters of the message to be transmitted to generate an identification ID, and adds the generated ID to the message to be transmitted, so that The ID becomes part of the message to be transmitted, and the message to be transmitted with the ID is sent out. Since the ID has become part of the message to be transmitted, a record of the corresponding ID is generated in each node through which the message to be transmitted passes. The record generated by each node by the ID attached to the message to be transmitted can grasp the delivery path of each transmitted message and understand the delivery status during the transmission of the transmitted message.
  • each node is queried whether there is an ID corresponding to the transmission message, and further determining which node of the transmission message is abnormal, therefore,
  • the method provided by the embodiment of the invention is convenient for the user to quickly find out the node where the abnormal situation occurs during the transmission.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of the messaging and receiving device in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • FIG. 7 shows a computing device that can implement a message transmitting and receiving method according to the present invention.
  • the computing device conventionally includes a processor 710 and a computer program product or computer readable medium in the form of a memory 720.
  • Memory 720 can be an electronic memory such as a flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • Memory 720 has a storage space 730 that stores program code 731 for performing any of the method steps described above.
  • storage space 730 storing program code may store respective program code 731 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • Such computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
  • Such a computer program product is typically a portable or fixed storage unit such as that shown in FIG.
  • the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 720 in the computing device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit stores computer readable code 731' for performing the method steps of the present invention, ie, code that can be read by a processor, such as 710, when the code is run by a computing device, causing the computing device Perform the various steps in the method described above.

Landscapes

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

Abstract

Provided are a message sending and receiving method and apparatus. The message sending method comprises: generating in a sending device a message to be transmitted, wherein the message to be transmitted carries a destination address; acquiring a relevant parameter of the message to be transmitted, and utilizing the relevant parameter to generate, for the message to be transmitted, an identifier (ID) corresponding thereto; adding the corresponding identifier (ID) to the message to be transmitted; and utilizing the sending device to send, to a destination, the message to be transmitted to which the ID has been added. In the technical solution, by means of a record generated on each node by an ID added to a message to be transmitted, a transfer path of each transmission message can be mastered, and a transfer state of the transmission message in a transmission process can be learned.

Description

消息发送、接收方法及装置Message sending and receiving method and device 技术领域Technical field
本发明涉及计算机技术领域,尤其涉及一种消息发送、接收方法及装置。The present invention relates to the field of computer technologies, and in particular, to a message sending and receiving method and apparatus.
背景技术Background technique
随着通信技术和网络技术的迅速发展,产生了大量消息传递类的应用工具,例如,消息发布订阅***,该***中存在三种角色,分别为生产者(producer)、代理(broker)、消费者(consumer)。Producer向某个topic发布消息,而consumer订阅某个topic的消息,进而一旦有新的关于某个topic的消息,broker会传递给订阅它的consumer。With the rapid development of communication technology and network technology, a large number of messaging application tools have been generated, for example, a message publishing and subscription system. There are three roles in the system, namely producer, broker, and consumer. (consumer). The Producer posts a message to a topic, and the consumer subscribes to a topic's message, and once there is a new message about a topic, the broker passes it to the consumer that subscribes to it.
现有技术中,消息在producer、broker、consumer三者之间进行传递过程中时,不能掌握消息的传递路径,无法了解消息传递的状态。In the prior art, when a message is transmitted between a producer, a broker, and a consumer, the message cannot be grasped and the state of the message cannot be known.
发明内容Summary of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决或者减缓上述问题的消息发送、接收装置和相应的消息发送、接收方法。In view of the above problems, the present invention has been made in order to provide a message transmitting and receiving apparatus and a corresponding message transmitting and receiving method that overcome the above problems or at least partially solve or alleviate the above problems.
基于本发明的一个方面,提供了一种消息发送方法,包括:在发送设备中生成待传输消息,其中,所述待传输消息中携带有目的地址;获取所述待传输消息的相关参数,利用所述相关参数为所述待传输消息生成其对应的标识ID;在所述待传输消息中添加对应标识ID;以及利用所述发送设备发送已添加ID的待传输消息至所述目的地。According to an aspect of the present invention, a message sending method is provided, including: generating a to-be-transmitted message in a sending device, where the to-be-transmitted message carries a destination address; acquiring related parameters of the to-be-transmitted message, utilizing And the related parameter is used to generate a corresponding identifier ID of the to-be-transmitted message; adding a corresponding identifier ID to the to-be-transmitted message; and transmitting, by using the sending device, the to-be-transmitted message with the added ID to the destination.
基于本发明的另一个方面,还提供了一种消息接收方法,包括:接收带标识ID的传输消息,其中,所述ID根据所述传输消息的相关参数生成;获取所述传输消息的ID,并解析以获取所述传输消息的相关参数;以及在接收设备中记录所述传输消息的ID和所述相关参数。According to another aspect of the present invention, a message receiving method is further provided, comprising: receiving a transport message with an identifier ID, wherein the ID is generated according to a related parameter of the transport message; acquiring an ID of the transport message, And parsing to obtain related parameters of the transmission message; and recording an ID of the transmission message and the related parameter in a receiving device.
基于本发明的另一个方面,还提供了一种消息发送装置,设置于消息的发送设备中,包括:消息生成模块,适于在所述发送设备中生成待传输消息,其中,所述待传输消息中携带有目的地址;标识生成模块,适于获取所述待传输消息的相关参数,利用所述相关参数为所述待传输消息生成其对应的标 识ID;添加模块,适于在所述待传输消息中添加对应标识ID;以及发送模块,适于利用所述发送设备发送已添加ID的待传输消息至所述目的地。According to another aspect of the present invention, a message sending apparatus is further provided, which is disposed in a sending device of a message, and includes: a message generating module, configured to generate a message to be transmitted in the sending device, where the to-be-transmitted The message carries a destination address, and the identifier generating module is configured to acquire a related parameter of the to-be-transmitted message, and use the related parameter to generate a corresponding label for the to-be-transmitted message. And an adding module, configured to add a corresponding identification ID to the to-be-transmitted message; and a sending module, configured to send, by using the sending device, the to-be-transmitted message with the added ID to the destination.
基于本发明的另一个方面,还提供了一种消息接收装置,设置于消息的接收设备,包括:接收模块,适于接收带标识ID的传输消息,其中,所述ID根据所述传输消息的相关参数生成;获取模块,适于获取所述传输消息的ID,并解析以获取所述传输消息的相关参数;以及记录模块,适于在接收设备中记录所述传输消息的ID和所述相关参数。According to another aspect of the present invention, a message receiving apparatus is provided, which is provided in a receiving device of a message, comprising: a receiving module, adapted to receive a transport message with an identifier ID, wherein the ID is according to the transport message Corresponding parameter generation; an obtaining module, configured to acquire an ID of the transmission message, and parse to obtain a related parameter of the transmission message; and a recording module, configured to record an ID of the transmission message and the correlation in a receiving device parameter.
根据本发明的又一个方面,还提供了一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行如上文所述的消息发送、接收方法。According to still another aspect of the present invention, there is also provided a computer program comprising computer readable code, when said computer readable code is run on a computing device, causing said computing device to perform a message transmission as described above , receiving method.
根据本发明的再一个方面,还提供了一种计算机可读介质,其中存储了如上文所述的计算机程序。According to still another aspect of the present invention, there is also provided a computer readable medium storing a computer program as described above.
采用本发明实施例中的方法,待传输消息生成之后,并不是立即发送至目的地,而是利用待传输消息的相关参数,生成一个标识ID,并将生成的ID添加至待传输消息,使ID成为待传输消息的一部分,再将附有ID的待传输消息发送出去。由于ID已成为待传输消息的一部分,使得在待传输消息经过的每一个节点中,均会生成对应的ID的记录。通过待传输消息附加的ID在每一个节点生成的记录,可以掌握每条传输消息的传递路径,了解传输消息传输过程中的传递状态。若在传输消息发送过程中出现异常情况,例如,传输中断,或者传输消息丢失,在每一个节点中查询是否存在传输消息对应的ID,进一步确定该传输消息在哪个节点出现异常,因此,通过本发明实施例提供的方法,便于用户快速查找出传输过程中的出现异常情况的节点。The method in the embodiment of the present invention, after the message to be transmitted is generated, is not immediately sent to the destination, but uses the relevant parameters of the message to be transmitted to generate an identification ID, and adds the generated ID to the message to be transmitted, so that The ID becomes part of the message to be transmitted, and the message to be transmitted with the ID is sent out. Since the ID has become part of the message to be transmitted, a record of the corresponding ID is generated in each node through which the message to be transmitted passes. The record generated by each node by the ID attached to the message to be transmitted can grasp the delivery path of each transmitted message and understand the delivery status during the transmission of the transmitted message. If an abnormal situation occurs during the transmission of the transmission message, for example, the transmission is interrupted, or the transmission message is lost, each node is queried whether there is an ID corresponding to the transmission message, and further determining which node of the transmission message is abnormal, therefore, The method provided by the embodiment of the invention is convenient for the user to quickly find out the node where the abnormal situation occurs during the transmission.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, and the above-described and other objects, features and advantages of the present invention can be more clearly understood. Specific embodiments of the invention are set forth below.
附图说明DRAWINGS
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示 相同的部件。在附图中:Various other advantages and benefits will become apparent to those skilled in the art from a The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting. Also throughout the drawings, the same reference symbols are used. The same parts. In the drawing:
图1示出了根据本发明一个实施例的消息发送方法的处理流程示意图;FIG. 1 is a schematic flowchart showing a process of a message sending method according to an embodiment of the present invention; FIG.
图2示出了根据本发明一个实施例的消息接收方法的处理流程示意图;FIG. 2 is a schematic flowchart showing the processing of a message receiving method according to an embodiment of the present invention; FIG.
图3示出了根据本发明一个实施例的消息发送装置的结构示意图;FIG. 3 is a schematic structural diagram of a message sending apparatus according to an embodiment of the present invention; FIG.
图4示出了根据本发明一个实施例的消息发送装置的另一种结构示意图;FIG. 4 is a schematic diagram showing another structure of a message transmitting apparatus according to an embodiment of the present invention; FIG.
图5示出了根据本发明一个实施例的消息接收装置的结构示意图;FIG. 5 is a schematic structural diagram of a message receiving apparatus according to an embodiment of the present invention; FIG.
图6示出了根据本发明一个实施例的消息接收装置的另一种结构示意图;FIG. 6 is a schematic diagram showing another structure of a message receiving apparatus according to an embodiment of the present invention; FIG.
图7示意性地示出了用于执行根据本发明的消息发送、接收方法的计算设备的框图;以及FIG. 7 is a block diagram schematically showing a computing device for performing a message transmitting and receiving method according to the present invention;
图8示意性地示出了用于保持或者携带实现根据本发明的消息发送、接收方法的程序代码的存储单元。Fig. 8 schematically shows a storage unit for holding or carrying program code implementing the message transmitting and receiving method according to the present invention.
具体实施方式detailed description
下面结合附图和具体的实施方式对本发明作进一步的描述。The invention is further described below in conjunction with the drawings and specific embodiments.
为解决上述技术问题,本发明实施例提供了一种消息发送方法。图1示出了根据本发明一个实施例的消息发送方法的处理流程示意图。参见图1,该方法至少包括以下步骤S102至步骤S108。To solve the above technical problem, an embodiment of the present invention provides a message sending method. FIG. 1 is a flow chart showing the processing of a message transmitting method according to an embodiment of the present invention. Referring to FIG. 1, the method includes at least the following steps S102 to S108.
首先,本发明实施例执行步骤S102,在发送设备中生成待传输消息,其中,待传输消息中携带有目的地址。First, the embodiment of the present invention performs step S102, and generates a to-be-transmitted message in the sending device, where the to-be-transmitted message carries a destination address.
生成待传输消息后,执行步骤S104,获取待传输消息的相关参数,利用相关参数为待传输消息生成其对应的标识ID。After the message to be transmitted is generated, step S104 is executed to obtain related parameters of the message to be transmitted, and the corresponding identifier is generated for the message to be transmitted by using the relevant parameter.
生成待传输消息对应的ID后,执行步骤S106,在传输消息中添加对应标识ID。After the ID corresponding to the message to be transmitted is generated, step S106 is performed, and the corresponding identifier ID is added to the transmission message.
最后,执行步骤S108,利用发送设备发送已添加ID的待传输消息至目的地。Finally, step S108 is executed to send the to-be-transmitted message with the added ID to the destination by using the sending device.
采用本发明实施例中的方法,待传输消息生成之后,并不是立即发送至目的地,而是利用待传输消息的相关参数,生成一个标识(ID),并将生成的ID添加至待传输消息,使ID成为待传输消息的一部分,再将附有ID的待传输消息发送出去。由于ID已成为待传输消息的一部分,使得在待传输 消息经过的每一个节点中,均会生成对应的ID的记录。通过待传输消息附加的ID在每一个节点生成的记录,可以掌握每条传输消息的传递路径,了解传输消息传输过程中的传递状态。若在传输消息发送过程中出现异常情况,例如,传输中断,或者传输消息丢失,在每一个节点中查询是否存在传输消息对应的ID,进一步确定该传输消息在哪个节点出现异常,因此,通过本发明实施例提供的方法,便于用户快速查找出传输过程中的出现异常情况的节点。With the method in the embodiment of the present invention, after the message to be transmitted is generated, it is not immediately sent to the destination, but an identifier (ID) is generated by using relevant parameters of the message to be transmitted, and the generated ID is added to the message to be transmitted. , so that the ID becomes part of the message to be transmitted, and then the message to be transmitted with the ID is sent out. Since the ID has become part of the message to be transmitted, so that it is to be transmitted Each node through which the message passes will generate a record of the corresponding ID. The record generated by each node by the ID attached to the message to be transmitted can grasp the delivery path of each transmitted message and understand the delivery status during the transmission of the transmitted message. If an abnormal situation occurs during the transmission of the transmission message, for example, the transmission is interrupted, or the transmission message is lost, each node is queried whether there is an ID corresponding to the transmission message, and further determining which node of the transmission message is abnormal, therefore, The method provided by the embodiment of the invention is convenient for the user to quickly find out the node where the abnormal situation occurs during the transmission.
每一个待传输消息相对于其他待传输消息具有唯一性,而ID相当于待传输消息的身份,为了能够区分出每一个待传输消息,因此,需要每一个待传输消息对应唯一的ID,尽量利用具有唯一性的相关参数生成对应的ID,使得每一个待传输消息对应的ID也具有唯一性。待传输消息对应的ID具有唯一性后,使得待传输消息附加的ID在每一个节点生成的记录也具有唯一性,更有利于掌握每条传输消息的传递路径,了解传输消息传输过程中的传递状态。Each message to be transmitted is unique with respect to other messages to be transmitted, and the ID is equivalent to the identity of the message to be transmitted. In order to distinguish each message to be transmitted, each message to be transmitted needs a unique ID, and the The unique related parameter generates a corresponding ID, so that the ID corresponding to each message to be transmitted is also unique. After the ID corresponding to the message to be transmitted is unique, the record added by the ID to be transmitted is unique in the record generated by each node, which is more advantageous for grasping the delivery path of each transmitted message, and understanding the transmission in the process of transmitting the message. status.
在本发明的一个优选实施例中,ID根据待传输消息的相关参数生成,其中,待传输消息的相关参数至少包括下列之一:发送设备的IP(Internet Protocol,互联网协议)地址、MAC(Media Access Control,媒体访问控制)地址、目的地址、发送时间戳。In a preferred embodiment of the present invention, the ID is generated according to a related parameter of the message to be transmitted, wherein the relevant parameter of the message to be transmitted includes at least one of the following: an IP (Internet Protocol) address of the transmitting device, and a MAC (Media) Access Control, media access control) address, destination address, and send timestamp.
需要说明地是,互联网协议地址,是IP协议提供的一种统一的地址格式,它为互联网上的每一个网络和每一台主机分配一个逻辑地址。媒体访问地址,或称为物理地址、硬件地址,用来定义网络设备的位置,表示互联网上每一个站点的符。由此得出,一个主机会有一个唯一的MAC地址,而每个网络位置会有一个专属于它的IP地址,IP地址和MAC地址均具有唯一性。It should be noted that the Internet Protocol address is a unified address format provided by the IP protocol, which assigns a logical address to each network and each host on the Internet. The media access address, or physical address, hardware address, is used to define the location of the network device and represents the character of each site on the Internet. It follows that a host will have a unique MAC address, and each network location will have a unique IP address, IP address and MAC address are unique.
为了使生成的ID具有唯一性,本发明实施例将具有唯一性的相关参数生成对应的ID,例如,发送设备的IP地址、MAC地址、发送时间戳。In order to make the generated ID unique, the embodiment of the present invention generates a corresponding ID with a unique related parameter, for example, an IP address, a MAC address, and a sending time stamp of the sending device.
在本发明的一个优选实施例中,利用预设规则将获取的多个待传输消息的相关参数排序并调整,生成对应的ID。其中,多个相关参数至少包括一个具有唯一性的相关参数,例如,发送设备的IP地址、MAC地址、发送时间戳等。具体地,待传输消息对应的ID的生成步骤为将多个相关参数按预定顺序排列,然后在各相关参数间设置间隔符和/或间隔字段。例如,生成待 传输消息对应的ID的相关参数为发送设备的IP地址、发送时间戳,其中,IP地址为192.168.1.1,发送时间戳为2015年12月20日10:00。IP地址、发送时间戳这两个相关参数的预定顺序为IP地址、发送时间戳,并且在这两个相关参数之间设置加号,则生成的ID为192.168.1.1+2015年12月20日10:00。若发送设备生成新的待传输消息,新的待传输消息对应的ID为192.168.1.1+2015年12月20日10:20。根据待传输消息的ID中的IP地址区分出不同发送设备的地址,根据待传输消息的ID中的发送时间戳区分出同一发送设备中不同待传输消息,使得待传输消息生成的ID具有唯一性,使得待传输消息附加的ID在每一个节点生成的记录也具有唯一性,更有利于掌握每条传输消息的传递路径。In a preferred embodiment of the present invention, the acquired related parameters of the plurality of to-be-transmitted messages are sorted and adjusted by using a preset rule to generate a corresponding ID. The plurality of related parameters include at least one unique related parameter, for example, an IP address, a MAC address, a sending time stamp, and the like of the sending device. Specifically, the step of generating the ID corresponding to the message to be transmitted is to arrange the plurality of related parameters in a predetermined order, and then setting a spacer and/or an interval field between the related parameters. For example, generate a wait The relevant parameters of the ID corresponding to the transmission message are the IP address of the sending device and the sending timestamp, where the IP address is 192.168.1.1 and the sending timestamp is 10:00 on December 20, 2015. The predetermined order of the two related parameters of the IP address and the transmission timestamp is the IP address, the transmission timestamp, and a plus sign is set between the two related parameters, and the generated ID is 192.168.1.1+December 20, 2015 10:00. If the sending device generates a new message to be transmitted, the ID of the new message to be transmitted is 192.168.1.1+10:20 on December 20, 2015. Differentiating the addresses of different sending devices according to the IP addresses in the ID of the message to be transmitted, and distinguishing different messages to be transmitted in the same sending device according to the sending timestamp in the ID of the message to be transmitted, so that the ID generated by the message to be transmitted is unique. The record added by the ID to be transmitted is unique in each node, which is more advantageous for grasping the delivery path of each transmitted message.
需要说明地是,生成ID的多个相关参数的个数可任意选择,各相关参数间设置的间隔符还可为冒号、分号等,另外,ID中包括的各相关参数还可选择设置间隔字段进行连接。本发明实施例中关于待传输消息对应的ID的例举仅仅是一个示例,对本发明并不造成任何限定。It should be noted that the number of the plurality of related parameters for generating the ID may be arbitrarily selected, and the interval set between the related parameters may also be a colon, a semicolon, etc. In addition, each related parameter included in the ID may also be selected to be set. Fields are connected. The exemplification of the ID corresponding to the message to be transmitted in the embodiment of the present invention is merely an example, and the present invention is not limited in any way.
待传输消息对应的ID生成之后,将其添加在待传输消息中,具体地,在待传输消息的头部添加对应的ID,或者,在待传输消息的尾部添加对应的ID。待传输消息的添加位置按照传输协议执行,便于传输过程中接收方接收到传输消息后,能够识别并解析出对应的ID。After the ID corresponding to the message to be transmitted is generated, it is added to the message to be transmitted. Specifically, a corresponding ID is added to the header of the message to be transmitted, or a corresponding ID is added at the end of the message to be transmitted. The added position of the to-be-transmitted message is performed according to the transmission protocol, so that the receiver can recognize and parse the corresponding ID after receiving the transmission message in the transmission process.
生成的ID添加至对应的待传输消息后,将附有ID的待传输消息发送出去,此时,将待传输消息的相关参数存储到发送设备的关键字-值(key-value)存储列表中,其中,在key-value存储列表中的key列存储待传输消息的ID,在key-value存储列表中的value列存储特定值或其相关参数的至少一部分。After the generated ID is added to the corresponding message to be transmitted, the message to be transmitted with the ID is sent out. At this time, the relevant parameters of the message to be transmitted are stored in the key-value storage list of the sending device. Wherein the key column in the key-value storage list stores the ID of the message to be transmitted, and the value column in the key-value storage list stores at least a part of the specific value or its related parameter.
具体地,若生成的ID中包括了待传输消息的所有相关参数,在key-value存储列表中的key列存储待传输消息的ID,为了节省存储空间,key-value存储列表中的value列可存储无意义的特定值(例如0\false\F),以符合key-value存储列表的存储格式。若生成的ID中包括了待传输消息的部分相关参数,key-value存储列表中的value列可存储对应的ID中没有包括的相关参数,或者key-value存储列表中的value列可存储对应的ID中没有包括的相关参数中的一部分,该部分相关参数可根据实际情况具体选定。例如,待传输消息包括10个相关参数,若生成的ID中包括了待传输消息的4个相关参数,此时,key-value存储列表中的value列可存储对应的ID中没有包 括的6个相关参数,或者,key-value存储列表中的value列可存储对应的ID中没有包括的6个相关参数中的2个,其中,本发明实施例中的相关参数的个数仅作为具体例举,对本发明并不造成任何限定。Specifically, if the generated ID includes all relevant parameters of the message to be transmitted, the key column in the key-value storage list stores the ID of the message to be transmitted. To save storage space, the value column in the key-value storage list may be Stores meaningless specific values (such as 0\false\F) to match the storage format of the key-value storage list. If the generated ID includes some related parameters of the message to be transmitted, the value column in the key-value storage list may store related parameters not included in the corresponding ID, or the value column in the key-value storage list may store the corresponding parameter. Some of the relevant parameters not included in the ID, the relevant parameters of this part can be selected according to the actual situation. For example, the message to be transmitted includes 10 related parameters. If the generated ID includes four related parameters of the message to be transmitted, the value column in the key-value storage list can store the corresponding ID without the packet. The 6 related parameters, or the value column in the key-value storage list, may store 2 of the 6 related parameters not included in the corresponding ID, wherein the number of related parameters in the embodiment of the present invention is only As a specific example, the invention is not limited at all.
存储完成后,将key-value存储列表上传至分布式存储***。其中,分布式存储***,是将数据分散存储在多***立的设备上,分布式网络存储***采用可扩展的***结构,利用多台存储服务器分担存储负荷,利用位置服务器定位存储信息,它不但提高了***的可靠性、可用性和存取效率,还易于扩展。After the storage is completed, the key-value storage list is uploaded to the distributed storage system. Among them, the distributed storage system distributes data in multiple independent devices. The distributed network storage system adopts a scalable system structure, which utilizes multiple storage servers to share storage load and locates storage information by using location servers. Increased system reliability, availability and access efficiency, and easy to scale.
若发送设备生成新的待传输消息,相应地,为该待传输消息生成对应的ID,当该附有ID的待传输消息发送出去后,将该已发送的待传输消息的相关参数存储到发送设备的key-value存储列表中。由于key-value存储列表增加了ID和相关参数的信息,将本次更新后的key-value存储列表上传至分布式存储***,由分布式存储***更新其上存储待传输消息的原key-value存储列表。If the sending device generates a new to-be-transmitted message, correspondingly, a corresponding ID is generated for the to-be-transmitted message, and after the message to be transmitted with the ID is sent, the related parameters of the sent-to-transmitted message are stored and sent. The device's key-value is stored in the list. The key-value storage list is added to the distributed storage system, and the original key-value of the message to be transmitted is updated by the distributed storage system. Store the list.
基于同一发明构思,本发明实施例还提供了一种消息接收方法。图2示出了根据本发明一个实施例的消息接收方法的处理流程示意图。参见图2,该方法至少包括以下步骤S202至步骤S206。Based on the same inventive concept, an embodiment of the present invention further provides a message receiving method. FIG. 2 is a flow chart showing the processing of a message receiving method according to an embodiment of the present invention. Referring to FIG. 2, the method includes at least the following steps S202 to S206.
首先,本发明实施例执行步骤S202,接收带标识ID的传输消息,其中,ID根据传输消息的相关参数生成。First, the embodiment of the present invention performs step S202, and receives a transmission message with an identifier ID, where the ID is generated according to a relevant parameter of the transmission message.
接收完传输消息后,执行步骤S204,获取传输消息的ID,并解析以获取传输消息的相关参数。After receiving the transmission message, step S204 is performed to obtain the ID of the transmission message and parse to obtain related parameters of the transmission message.
最后,执行步骤S206,在接收设备中记录传输消息的ID和相关参数。Finally, step S206 is performed to record the ID of the transmission message and related parameters in the receiving device.
采用本发明实施例提供的方法,接收设备接收带ID的传输消息后,获取传输消息的ID,并记录传输消息的ID,即在接收环节生成传输消息的一个记录,便于用户掌握每条传输消息的传递路径,了解传输消息传输过程中的传递状态。With the method provided by the embodiment of the present invention, after receiving the transmission message with the ID, the receiving device acquires the ID of the transmission message, and records the ID of the transmission message, that is, generates a record of the transmission message in the receiving link, so that the user can grasp each transmission message. The delivery path to understand the delivery status during the transmission of the message.
接收设备接收到附有ID的待传输消息后,在本发明的一个优选实施例中,在接收设备中不仅记录传输消息的ID,还要记录发送设备的IP地址、MAC地址、目的地址、发送时间戳,以及接收设备的IP地址、MAC地址、接收时间戳。After the receiving device receives the message to be transmitted with the ID, in a preferred embodiment of the present invention, not only the ID of the transmission message but also the IP address, MAC address, destination address, and transmission of the transmitting device are recorded in the receiving device. Timestamp, and the IP address, MAC address, and receiving timestamp of the receiving device.
将记录的传输消息的ID和相关参数存储到接收设备的key-value存储列 表中,其中,在key-value存储列表中的key列存储待传输消息的ID,在key-value存储列表中的value列存储特定值或其相关参数的至少一部分作为存储value。接收设备的key-value存储列表中存储待传输消息的ID和相关参数,相当于在接收环节对传输消息进行记录。Store the ID of the recorded transmission message and related parameters to the key-value storage column of the receiving device In the table, the key column in the key-value storage list stores the ID of the message to be transmitted, and the value column in the key-value storage list stores at least a part of the specific value or its related parameter as the storage value. The ID of the message to be transmitted and the related parameters are stored in the key-value storage list of the receiving device, which is equivalent to recording the transmission message at the receiving link.
具体地,若生成的ID中包括了待传输消息的所有相关参数,在接收设备的key-value存储列表中的key列存储待传输消息的ID,为了节省存储空间,key-value存储列表中的value列可存储无意义的特定值(例如,0\false\F),以符合key-value存储列表的存储格式。若生成的ID中包括了待传输消息的部分相关参数,key-value存储列表中的value列可存储对应的ID中没有包括的相关参数,或者key-value存储列表中的value列可存储对应的ID中没有包括的相关参数中的一部分,该部分相关参数可根据实际情况具体选定。例如,待传输消息包括10个相关参数,若生成的ID中包括了待传输消息的4个相关参数,此时,key-value存储列表中的value列可存储对应的ID中没有包括的6个相关参数,或者,key-value存储列表中的value列可存储对应的ID中没有包括的6个相关参数中的2个,其中,本发明实施例中涉及的相关参数的个数仅作为具体例举,对本发明并不造成任何限定。Specifically, if the generated ID includes all relevant parameters of the message to be transmitted, the key column in the key-value storage list of the receiving device stores the ID of the message to be transmitted, in order to save storage space, the key-value is stored in the list. The value column stores a meaningless specific value (for example, 0\false\F) to match the storage format of the key-value storage list. If the generated ID includes some related parameters of the message to be transmitted, the value column in the key-value storage list may store related parameters not included in the corresponding ID, or the value column in the key-value storage list may store the corresponding parameter. Some of the relevant parameters not included in the ID, the relevant parameters of this part can be selected according to the actual situation. For example, the message to be transmitted includes 10 related parameters. If the generated ID includes 4 related parameters of the message to be transmitted, the value column in the key-value storage list can store 6 items not included in the corresponding ID. The related parameter, or the value column in the key-value storage list, may store two of the six related parameters that are not included in the corresponding ID, wherein the number of related parameters involved in the embodiment of the present invention is only a specific example. It is to be understood that the invention is not limited in any way.
接收设备完成存储后,将key-value存储列表上传至分布式存储***。若接收设备又接收到传输消息,相应地,将传输消息对应的ID和相关参数存储到接收设备的key-value存储列表中。由于接收设备的key-value存储列表增加了ID和相关参数的信息,将本次更新后的key-value存储列表上传至分布式存储***,由分布式存储***覆盖掉其上存储的接收设备的上传的原key-value存储列表。After the receiving device completes the storage, the key-value storage list is uploaded to the distributed storage system. If the receiving device receives the transmission message, correspondingly, the ID and related parameters corresponding to the transmission message are stored in the key-value storage list of the receiving device. The updated key-value storage list is uploaded to the distributed storage system, and the distributed storage system overwrites the receiving device stored thereon, because the information of the ID and related parameters is added to the key-value storage list of the receiving device. The original key-value storage list uploaded.
需要补充地是,传输消息从源地址发送出来,到达目的地址之前,传输过程中会通过一些中间环节,例如,路由器,传输消息在经过路由器时,也需要对传输消息进行解析,并将传输消息对应的ID记录下来。It should be added that the transmission message is sent from the source address and reaches the destination address. During the transmission process, some intermediate links, such as routers, are transmitted. When the message is transmitted through the router, the transmission message needs to be parsed and the message will be transmitted. The corresponding ID is recorded.
综上,在传输消息的发送环节、中间环节、接收环节均记录了传输消息对应的ID,通过每一个环节形成的ID记录,可以掌握每条传输消息的传递路径,了解传输消息传输过程中的传递状态。In summary, the ID corresponding to the transmission message is recorded in the transmission link, the intermediate link and the receiving link of the transmission message. Through the ID record formed by each link, the transmission path of each transmission message can be grasped, and the transmission path of the transmission message is known. Delivery status.
基于同一发明构思,本发明实施例还提供了一种消息发送装置。图3示出了根据本发明一个实施例的消息发送装置的结构示意图。参见图3,该装置至少包括: Based on the same inventive concept, an embodiment of the present invention further provides a message sending apparatus. FIG. 3 is a block diagram showing the structure of a message transmitting apparatus according to an embodiment of the present invention. Referring to FIG. 3, the device at least includes:
消息生成模块310,适于在发送设备中生成待传输消息,其中,待传输消息中携带有目的地址;The message generating module 310 is configured to generate a to-be-transmitted message in the sending device, where the to-be-transmitted message carries a destination address;
标识生成模块320,与消息生成模块310耦合,适于获取待传输消息的相关参数,利用相关参数为待传输消息生成其对应的标识ID;The identifier generation module 320 is coupled to the message generation module 310, and is configured to acquire related parameters of the message to be transmitted, and generate corresponding identifier IDs for the to-be-transmitted message by using the relevant parameters;
添加模块330,与标识生成模块320耦合,适于在待传输消息中添加对应标识ID;The adding module 330 is coupled to the identifier generating module 320, and is adapted to add a corresponding identifier ID to the message to be transmitted;
发送模块340,与添加模块330耦合,适于利用发送设备发送已添加ID的待传输消息至目的地。The sending module 340 is coupled to the adding module 330, and is adapted to send, by using the sending device, the to-be-transmitted message with the added ID to the destination.
在本发明的一个优选实施例中,标识生成模块320还适于:In a preferred embodiment of the present invention, the identifier generating module 320 is further adapted to:
获取待传输消息的下列至少之一的相关参数:发送设备的IP地址、MAC地址、目的地址、发送时间戳。Obtaining related parameters of at least one of the following to be transmitted: an IP address, a MAC address, a destination address, and a sending timestamp of the sending device.
在本发明的一个优选实施例中,标识生成模块320还适于:In a preferred embodiment of the present invention, the identifier generating module 320 is further adapted to:
利用预设规则将获取的多个相关参数排序并调整,以生成其对应的ID。The obtained related parameters are sorted and adjusted by using a preset rule to generate their corresponding IDs.
在本发明的一个优选实施例中,标识生成模块320还适于:In a preferred embodiment of the present invention, the identifier generating module 320 is further adapted to:
将多个相关参数按预定顺序排列;Arranging a plurality of related parameters in a predetermined order;
在各相关参数间设置间隔符和/或间隔字段。A spacer and/or interval field is set between each relevant parameter.
在本发明的一个优选实施例中,参见图4,消息发送装置还包括:In a preferred embodiment of the present invention, referring to FIG. 4, the message sending apparatus further includes:
存储模块350,与发送模块340耦合,适于在发送设备的key-value存储列表中存储待传输消息的相关参数,其中,待传输消息的ID作为存储key,特定值或其相关参数的至少一部分作为存储value。The storage module 350 is coupled to the sending module 340, and is configured to store, in a key-value storage list of the sending device, a related parameter of the message to be transmitted, where the ID of the message to be transmitted is used as a storage key, a specific value or at least a part of a related parameter thereof. As a storage value.
在本发明的一个优选实施例中,参见图4,消息发送装置还包括:In a preferred embodiment of the present invention, referring to FIG. 4, the message sending apparatus further includes:
第一上传模块360,与存储模块350耦合,适于将本次更新后的key-value存储列表上传至分布式存储***,由分布式存储***更新其上存储待传输消息的原key-value存储列表。The first uploading module 360 is coupled to the storage module 350, and is adapted to upload the updated key-value storage list to the distributed storage system, and the distributed storage system updates the original key-value storage on which the message to be transmitted is stored. List.
基于同一发明构思,本发明实施例还提供了一种消息接收装置,设置于消息的接收设备。图5示出了根据本发明一个实施例的消息接收装置的结构示意图。参见图5,该装置至少包括:Based on the same inventive concept, an embodiment of the present invention further provides a message receiving apparatus, which is disposed in a receiving device of a message. FIG. 5 is a block diagram showing the structure of a message receiving apparatus according to an embodiment of the present invention. Referring to Figure 5, the device includes at least:
接收模块510,适于接收带标识ID的传输消息,其中,ID根据传输消息的相关参数生成;The receiving module 510 is adapted to receive a transmission message with an identifier ID, where the ID is generated according to a relevant parameter of the transmission message;
获取模块520,与接收模块510耦合,适于获取传输消息的ID,并解析以获取传输消息的相关参数; The obtaining module 520 is coupled to the receiving module 510, and is adapted to obtain an ID of the transport message, and parse to obtain a related parameter of the transport message.
记录模块530,与获取模块520耦合,适于在接收设备中记录传输消息的ID和相关参数。The recording module 530 is coupled to the acquisition module 520 and is adapted to record the ID of the transmission message and related parameters in the receiving device.
在本发明的一个优选实施例中,相关参数包括下列至少之一:In a preferred embodiment of the invention, the relevant parameters comprise at least one of the following:
发送传输消息的发送设备的IP地址、MAC地址、目的地址、发送时间戳;IP address, MAC address, destination address, and transmission timestamp of the sending device that sends the transmission message;
接收设备的IP地址、MAC地址、接收时间戳。Receive the device's IP address, MAC address, and receive timestamp.
在本发明的一个优选实施例中,记录模块530还适于:In a preferred embodiment of the invention, the recording module 530 is further adapted to:
在接收设备中以key-value存储列表中存储待传输消息的相关参数,其中,待传输消息的ID作为存储key,特定值或其相关参数的至少一部分作为存储value。A related parameter of the message to be transmitted is stored in the key-value storage list in the receiving device, wherein the ID of the message to be transmitted is used as a storage key, and at least a part of the specific value or its related parameter is used as the storage value.
在本发明的一个优选实施例中,参见图6,消息接收装置还包括:In a preferred embodiment of the present invention, referring to FIG. 6, the message receiving apparatus further includes:
第二上传模块540,与记录模块530耦合,适于将本次更新后的key-value存储列表上传至分布式存储***,由分布式存储***更新其上存储传输消息的原key-value存储列表。The second uploading module 540 is coupled to the recording module 530, and is adapted to upload the updated key-value storage list to the distributed storage system, and the distributed storage system updates the original key-value storage list on which the transport message is stored. .
综上,采用本发明实施例提供的消息发送、接收方法及装置可以达到如下有益效果:In summary, the message sending and receiving method and apparatus provided by the embodiments of the present invention can achieve the following beneficial effects:
采用本发明实施例中的方法,待传输消息生成之后,并不是立即发送至目的地,而是利用待传输消息的相关参数,生成一个标识ID,并将生成的ID添加至待传输消息,使ID成为待传输消息的一部分,再将附有ID的待传输消息发送出去。由于ID已成为待传输消息的一部分,使得在待传输消息经过的每一个节点中,均会生成对应的ID的记录。通过待传输消息附加的ID在每一个节点生成的记录,可以掌握每条传输消息的传递路径,了解传输消息传输过程中的传递状态。若在传输消息发送过程中出现异常情况,例如,传输中断,或者传输消息丢失,在每一个节点中查询是否存在传输消息对应的ID,进一步确定该传输消息在哪个节点出现异常,因此,通过本发明实施例提供的方法,便于用户快速查找出传输过程中的出现异常情况的节点。The method in the embodiment of the present invention, after the message to be transmitted is generated, is not immediately sent to the destination, but uses the relevant parameters of the message to be transmitted to generate an identification ID, and adds the generated ID to the message to be transmitted, so that The ID becomes part of the message to be transmitted, and the message to be transmitted with the ID is sent out. Since the ID has become part of the message to be transmitted, a record of the corresponding ID is generated in each node through which the message to be transmitted passes. The record generated by each node by the ID attached to the message to be transmitted can grasp the delivery path of each transmitted message and understand the delivery status during the transmission of the transmitted message. If an abnormal situation occurs during the transmission of the transmission message, for example, the transmission is interrupted, or the transmission message is lost, each node is queried whether there is an ID corresponding to the transmission message, and further determining which node of the transmission message is abnormal, therefore, The method provided by the embodiment of the invention is convenient for the user to quickly find out the node where the abnormal situation occurs during the transmission.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that the embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of the description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个 或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be understood that in order to streamline the present disclosure and to help understand one of the various inventive aspects In the above description of the exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description. However, the method disclosed is not to be interpreted as reflecting the intention that the claimed invention requires more features than those recited in the claims. Rather, as the following claims reflect, inventive aspects reside in less than all features of the single embodiments disclosed herein. Therefore, the claims following the specific embodiments are hereby explicitly incorporated into the embodiments, and each of the claims as a separate embodiment of the invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art will appreciate that the modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components. In addition to such features and/or at least some of the processes or units being mutually exclusive, any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined. Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features that are included in other embodiments and not in other features, combinations of features of different embodiments are intended to be within the scope of the present invention. Different embodiments are formed and formed. For example, in the following claims, any one of the claimed embodiments can be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的消息发送、接收装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components of the messaging and receiving device in accordance with embodiments of the present invention. The invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein. Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
例如,图7示出了可以实现根据本发明的消息发送、接收方法的计算设 备。该计算设备传统上包括处理器710和以存储器720形式的计算机程序产品或者计算机可读介质。存储器720可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器720具有存储用于执行上述方法中的任何方法步骤的程序代码731的存储空间730。例如,存储程序代码的存储空间730可以存储分别用于实现上面的方法中的各种步骤的各个程序代码731。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为例如图8所示的便携式或者固定存储单元。该存储单元可以具有与图7的计算设备中的存储器720类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元存储用于执行本发明的方法步骤的计算机可读代码731’,即可以由例如710之类的处理器读取的代码,当这些代码当由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。For example, FIG. 7 shows a computing device that can implement a message transmitting and receiving method according to the present invention. Ready. The computing device conventionally includes a processor 710 and a computer program product or computer readable medium in the form of a memory 720. Memory 720 can be an electronic memory such as a flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Memory 720 has a storage space 730 that stores program code 731 for performing any of the method steps described above. For example, storage space 730 storing program code may store respective program code 731 for implementing various steps in the above methods, respectively. The program code can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such a computer program product is typically a portable or fixed storage unit such as that shown in FIG. The storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 720 in the computing device of FIG. The program code can be compressed, for example, in an appropriate form. Typically, the storage unit stores computer readable code 731' for performing the method steps of the present invention, ie, code that can be read by a processor, such as 710, when the code is run by a computing device, causing the computing device Perform the various steps in the method described above.
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本发明的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。"an embodiment," or "an embodiment," or "an embodiment," In addition, it is noted that the phrase "in one embodiment" is not necessarily referring to the same embodiment.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It is to be noted that the above-described embodiments are illustrative of the invention and are not intended to be limiting, and that the invention may be devised without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as a limitation. The word "comprising" does not exclude the presence of the elements or steps that are not recited in the claims. The word "a" or "an" The invention can be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by the same hardware item. The use of the words first, second, and third does not indicate any order. These words can be interpreted as names.
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所 做的公开是说明性的,而非限制性的,本发明的范围由所附权利要求书限定。 In addition, it should be noted that the language used in the specification has been selected for the purpose of readability and teaching, and is not intended to be construed or limited. Therefore, many modifications and changes will be apparent to those skilled in the art without departing from the scope of the invention. For the scope of the present invention, the present invention The disclosure is intended to be illustrative, and not restrictive, and the scope of the invention is defined by the appended claims.

Claims (24)

  1. 一种消息发送方法,包括:A method for sending a message, comprising:
    在发送设备中生成待传输消息,其中,所述待传输消息中携带有目的地址;Generating a message to be transmitted in the sending device, where the to-be-transmitted message carries a destination address;
    获取所述待传输消息的相关参数,利用所述相关参数为所述待传输消息生成其对应的标识ID;Obtaining a related parameter of the to-be-transmitted message, and generating, by using the related parameter, a corresponding identifier ID of the to-be-transmitted message;
    在所述待传输消息中添加对应标识ID;Adding a corresponding identifier ID to the to-be-transmitted message;
    利用所述发送设备发送已添加ID的待传输消息至所述目的地。Sending, by the sending device, a message to be transmitted with an added ID to the destination.
  2. 根据权利要求1所述的方法,其中,获取所述待传输消息的相关参数,具体包括:The method of claim 1, wherein the acquiring the related parameters of the message to be transmitted includes:
    获取所述待传输消息的下列至少之一的相关参数:所述发送设备的IP地址、MAC地址、目的地址、发送时间戳。Obtaining related parameters of at least one of the following to be transmitted: an IP address, a MAC address, a destination address, and a sending timestamp of the sending device.
  3. 根据权利要求2所述的方法,其中,利用所述相关参数为所述待传输消息生成其对应的ID,具体包括:The method of claim 2, wherein the generating the corresponding ID for the message to be transmitted by using the relevant parameter comprises:
    利用预设规则将获取的多个相关参数排序并调整,以生成其对应的ID。The obtained related parameters are sorted and adjusted by using a preset rule to generate their corresponding IDs.
  4. 根据权利要求3所述的方法,其中,所述利用预设规则将获取的多个相关参数排序并调整,包括:The method according to claim 3, wherein the sorting and adjusting the acquired plurality of related parameters by using a preset rule comprises:
    将多个相关参数按预定顺序排列;Arranging a plurality of related parameters in a predetermined order;
    在各相关参数间设置间隔符和/或间隔字段。A spacer and/or interval field is set between each relevant parameter.
  5. 根据权利要求1所述的方法,其中,在所述待传输消息中添加对应标识ID,具体包括:The method according to claim 1, wherein the adding the corresponding identifier ID to the message to be transmitted includes:
    在所述待传输消息的头部添加对应ID;或者,Adding a corresponding ID to the header of the message to be transmitted; or
    在所述待传输消息的尾部添加对应ID。A corresponding ID is added at the end of the message to be transmitted.
  6. 根据权利要求1至5任一项所述的方法,其中,还包括:The method according to any one of claims 1 to 5, further comprising:
    在所述发送设备的key-value存储列表中存储所述待传输消息的相关参数,其中,所述待传输消息的ID作为存储key,特定值或其相关参数的至少一部分作为存储value。And storing, in the key-value storage list of the sending device, a related parameter of the to-be-transmitted message, where the ID of the to-be-transmitted message is used as a storage key, at least a part of a specific value or a related parameter thereof as a storage value.
  7. 根据权利要求6所述的方法,其中,将本次更新后的key-value存储列表上传至分布式存储***,由所述分布式存储***更新其上存储所述待传输消息的原key-value存储列表。 The method according to claim 6, wherein the updated key-value storage list is uploaded to the distributed storage system, and the distributed storage system updates the original key-value on which the message to be transmitted is stored. Store the list.
  8. 一种消息接收方法,包括:A message receiving method includes:
    接收带标识ID的传输消息,其中,所述ID根据所述传输消息的相关参数生成;Receiving a transport message with an identifier ID, wherein the ID is generated according to a relevant parameter of the transport message;
    获取所述传输消息的ID,并解析以获取所述传输消息的相关参数;Obtaining an ID of the transport message, and parsing to obtain a related parameter of the transport message;
    在接收设备中记录所述传输消息的ID和所述相关参数。The ID of the transmission message and the related parameters are recorded in the receiving device.
  9. 根据权利要求8所述的方法,其中,所述相关参数包括下列至少之一:The method of claim 8 wherein said related parameters comprise at least one of the following:
    发送所述传输消息的发送设备的IP地址、MAC地址、目的地址、发送时间戳;The IP address, MAC address, destination address, and transmission timestamp of the sending device that sends the transmission message;
    所述接收设备的IP地址、MAC地址、接收时间戳。The IP address, MAC address, and receiving timestamp of the receiving device.
  10. 根据权利要求8或9所述的方法,其中,在接收设备中记录所述传输消息的ID和所述相关参数,具体包括:The method according to claim 8 or 9, wherein the recording of the ID of the transmission message and the related parameter in the receiving device comprises:
    在所述接收设备中以key-value存储列表中存储所述传输消息的相关参数,其中,所述传输消息的ID作为存储key,特定值或其相关参数的至少一部分作为存储value。And storing, in the receiving device, a related parameter of the transport message in a key-value storage list, where the ID of the transport message is used as a storage key, at least a part of a specific value or a related parameter thereof as a storage value.
  11. 根据权利要求10所述的方法,其中,将本次更新后的key-value存储列表上传至分布式存储***,由所述分布式存储***更新其上存储所述传输消息的原key-value存储列表。The method according to claim 10, wherein the updated key-value storage list is uploaded to a distributed storage system, and the distributed key storage system updates the original key-value storage on which the transfer message is stored. List.
  12. 一种消息发送装置,设置于消息的发送设备中,包括:A message sending device is disposed in a sending device of a message, and includes:
    消息生成模块,适于在所述发送设备中生成待传输消息,其中,所述待传输消息中携带有目的地址;a message generating module, configured to generate a to-be-transmitted message in the sending device, where the to-be-transmitted message carries a destination address;
    标识生成模块,适于获取所述待传输消息的相关参数,利用所述相关参数为所述待传输消息生成其对应的标识ID;An identifier generating module, configured to acquire a related parameter of the to-be-transmitted message, and generate a corresponding identifier ID for the to-be-transmitted message by using the related parameter;
    添加模块,适于在所述待传输消息中添加对应标识ID;Adding a module, configured to add a corresponding identifier ID to the to-be-transmitted message;
    发送模块,适于利用所述发送设备发送已添加ID的待传输消息至所述目的地。And a sending module, configured to send, by using the sending device, a to-be-transmitted message with an added ID to the destination.
  13. 根据权利要求12所述的装置,其中,所述标识生成模块还适于:The apparatus of claim 12, wherein the identification generating module is further adapted to:
    获取所述待传输消息的下列至少之一的相关参数:所述发送设备的IP地址、MAC地址、目的地址、发送时间戳。Obtaining related parameters of at least one of the following to be transmitted: an IP address, a MAC address, a destination address, and a sending timestamp of the sending device.
  14. 根据权利要求13所述的装置,其中,所述标识生成模块还适于:The apparatus of claim 13, wherein the identification generating module is further adapted to:
    利用预设规则将获取的多个相关参数排序并调整,以生成其对应的ID。 The obtained related parameters are sorted and adjusted by using a preset rule to generate their corresponding IDs.
  15. 根据权利要求14所述的装置,其中,所述标识生成模块还适于:The apparatus of claim 14, wherein the identification generating module is further adapted to:
    将多个相关参数按预定顺序排列;Arranging a plurality of related parameters in a predetermined order;
    在各相关参数间设置间隔符和/或间隔字段。A spacer and/or interval field is set between each relevant parameter.
  16. 根据权利要求12所述的装置,其中,所述添加模块还适于:The apparatus of claim 12 wherein said adding module is further adapted to:
    在所述待传输消息的头部添加对应ID;或者,Adding a corresponding ID to the header of the message to be transmitted; or
    在所述待传输消息的尾部添加对应ID。A corresponding ID is added at the end of the message to be transmitted.
  17. 根据权利要求12至16任一项所述的装置,其中,还包括:The apparatus according to any one of claims 12 to 16, further comprising:
    存储模块,适于在所述发送设备的key-value存储列表中存储所述待传输消息的相关参数,其中,所述待传输消息的ID作为存储key,特定值或其相关参数的至少一部分作为存储value。a storage module, configured to store, in a key-value storage list of the sending device, a related parameter of the to-be-transmitted message, where the ID of the to-be-transmitted message is used as a storage key, a specific value, or at least a part thereof Store the value.
  18. 根据权利要求17所述的装置,其中,还包括:The device according to claim 17, further comprising:
    第一上传模块,适于将本次更新后的key-value存储列表上传至分布式存储***,由所述分布式存储***更新其上存储所述待传输消息的原key-value存储列表。The first uploading module is adapted to upload the updated key-value storage list to the distributed storage system, and the distributed storage system updates the original key-value storage list on which the message to be transmitted is stored.
  19. 一种消息接收装置,设置于消息的接收设备,包括:A message receiving device, which is disposed on a receiving device of a message, includes:
    接收模块,适于接收带标识ID的传输消息,其中,所述ID根据所述传输消息的相关参数生成;a receiving module, configured to receive a transmission message with an identifier ID, where the ID is generated according to a related parameter of the transmission message;
    获取模块,适于获取所述传输消息的ID,并解析以获取所述传输消息的相关参数;An obtaining module, configured to obtain an ID of the transport message, and parse to obtain a related parameter of the transport message;
    记录模块,适于在接收设备中记录所述传输消息的ID和所述相关参数。And a recording module adapted to record an ID of the transmission message and the related parameter in a receiving device.
  20. 根据权利要求19所述的装置,其中,所述相关参数包括下列至少之一:The apparatus of claim 19, wherein the correlation parameter comprises at least one of the following:
    发送所述传输消息的发送设备的IP地址、MAC地址、目的地址、发送时间戳;The IP address, MAC address, destination address, and transmission timestamp of the sending device that sends the transmission message;
    所述接收设备的IP地址、MAC地址、接收时间戳。The IP address, MAC address, and receiving timestamp of the receiving device.
  21. 根据权利要求19或20所述的装置,其中,所述记录模块还适于:The apparatus according to claim 19 or 20, wherein the recording module is further adapted to:
    在所述接收设备中以key-value存储列表中存储所述待传输消息的相关参数,其中,所述待传输消息的ID作为存储key,特定值或其相关参数的至少一部分作为存储value。The related parameter of the to-be-transmitted message is stored in the key-value storage list in the receiving device, wherein the ID of the message to be transmitted is used as a storage key, at least a part of a specific value or a related parameter thereof as a storage value.
  22. 根据权利要求21所述的装置,其中,还包括:The device according to claim 21, further comprising:
    第二上传模块,适于将本次更新后的key-value存储列表上传至分布式 存储***,由所述分布式存储***更新其上存储所述传输消息的原key-value存储列表。a second uploading module, configured to upload the updated key-value storage list to the distributed A storage system that updates a list of original key-value stores on which the transport message is stored by the distributed storage system.
  23. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1-7中任一个所述的消息发送方法和/或根据权利要求8-11中任一个所述的消息接收方法。A computer program comprising computer readable code, when said computer readable code is run on a computing device, causing said computing device to perform a message transmitting method according to any one of claims 1-7 and/or A message receiving method according to any one of claims 8-11.
  24. 一种计算机可读介质,其中存储了如权利要求23所述的计算机程序。 A computer readable medium storing the computer program of claim 23.
PCT/CN2016/111561 2015-12-25 2016-12-22 Message sending and receiving method and apparatus WO2017107963A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510997710.0A CN105553832A (en) 2015-12-25 2015-12-25 Message sending and receiving method and device
CN201510997710.0 2015-12-25

Publications (1)

Publication Number Publication Date
WO2017107963A1 true WO2017107963A1 (en) 2017-06-29

Family

ID=55832771

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/111561 WO2017107963A1 (en) 2015-12-25 2016-12-22 Message sending and receiving method and apparatus

Country Status (2)

Country Link
CN (1) CN105553832A (en)
WO (1) WO2017107963A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019237683A1 (en) * 2018-06-14 2019-12-19 烽火通信科技股份有限公司 Protocol packet, and method for managing virtual client terminal device
CN111338814A (en) * 2020-02-13 2020-06-26 北京奇艺世纪科技有限公司 Message processing method and device, storage medium and electronic device

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105553832A (en) * 2015-12-25 2016-05-04 北京奇虎科技有限公司 Message sending and receiving method and device
CN106789415A (en) * 2016-12-12 2017-05-31 东软集团股份有限公司 The acquisition method of facility information, apparatus and system
CN109040334B (en) * 2018-07-12 2021-05-11 山东师范大学 Static intranet mapping method, extranet server, intranet communication equipment and system
CN111327687B (en) * 2020-01-21 2023-02-21 卓米私人有限公司 Data transmission method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789868A (en) * 2000-09-26 2010-07-28 兰代拉·纳特股份公司 An access point for mobile devices in a packet based network and a method and a system for billing in such a network
US8761181B1 (en) * 2013-04-19 2014-06-24 Cubic Corporation Packet sequence number tracking for duplicate packet detection
CN103944671A (en) * 2014-05-22 2014-07-23 中国地质大学(武汉) Method and system for real-time transmission of ultra-wideband airborne data based on multichannel aggregation
CN105553832A (en) * 2015-12-25 2016-05-04 北京奇虎科技有限公司 Message sending and receiving method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436952B (en) * 2007-11-14 2011-10-05 华为技术有限公司 Method for automatically configuring pressing table and network node equipment
CN101291300B (en) * 2008-06-12 2011-04-20 华为技术有限公司 Implementing method, apparatus and user equipment for document transmission in message service
CN102571635A (en) * 2012-01-18 2012-07-11 浪潮(北京)电子信息产业有限公司 Message transmission method and equipment
CN104935499A (en) * 2015-05-28 2015-09-23 杭州华三通信技术有限公司 Message format conversion method and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789868A (en) * 2000-09-26 2010-07-28 兰代拉·纳特股份公司 An access point for mobile devices in a packet based network and a method and a system for billing in such a network
US8761181B1 (en) * 2013-04-19 2014-06-24 Cubic Corporation Packet sequence number tracking for duplicate packet detection
CN103944671A (en) * 2014-05-22 2014-07-23 中国地质大学(武汉) Method and system for real-time transmission of ultra-wideband airborne data based on multichannel aggregation
CN105553832A (en) * 2015-12-25 2016-05-04 北京奇虎科技有限公司 Message sending and receiving method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019237683A1 (en) * 2018-06-14 2019-12-19 烽火通信科技股份有限公司 Protocol packet, and method for managing virtual client terminal device
CN111338814A (en) * 2020-02-13 2020-06-26 北京奇艺世纪科技有限公司 Message processing method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN105553832A (en) 2016-05-04

Similar Documents

Publication Publication Date Title
WO2017107963A1 (en) Message sending and receiving method and apparatus
CN111708825B (en) Data processing method, device and equipment based on block chain and readable storage medium
US20210168122A1 (en) Selective encryption delineation
CN103457993B (en) Local cache device and the method that content caching service is provided
CN102111685B (en) Acceleration method, equipment and system for network video loading
CN107547310B (en) User behavior correlation analysis method and system based on bypass audit equipment
CN104079614B (en) The method and system obtained in order for distributed post ordering system message
CN104798052B (en) The matched method and apparatus of consumer
CN110830442A (en) Message processing method, device and gateway
CN111083179B (en) Internet of things cloud platform, and equipment interaction method and device based on same
WO2018145538A1 (en) Message processing method and device for live broadcast platform
EP2756657B1 (en) A system for dynamic service collaboration through identification and context of plurality of heterogeneous devices
WO2016107306A1 (en) Message subscription method, processing node device and message bus
CN105930502B (en) System, client and method for collecting data
WO2015081715A1 (en) Method and apparatus for counting online users on website
CN108667732A (en) A kind of message forwarding method and device
JP2016529594A (en) Content sharing method and social synchronization apparatus
CN107431700A (en) Instruction for segment section
CN111447233B (en) Message filtering method and device based on VXLAN
CN102984218B (en) Browser and login method thereof and system
CN113259467A (en) Webpage asset fingerprint tag identification and discovery method based on big data
CN107667516A (en) System and method for improved trivial file transfer protocol
CN107070719A (en) A kind of device management method and device
CN104796426B (en) The detection method at webpage back door
CN108845995A (en) Data processing method, device, storage medium and electronic device

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: 16877773

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: 16877773

Country of ref document: EP

Kind code of ref document: A1