Message transmission method, device, system and storage medium

By obtaining and utilizing the forwarding information of the destination device, multiple paths send messages with message validity periods, solving the problem of timely message transmission in remote interaction of industrial equipment and improving the success rate of message arrival.

CN117118940BActive Publication Date: 2025-05-23HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210530604.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-16
Publication Date
2025-05-23
Estimated Expiration
2042-05-16

AI Technical Summary

Technical Problem

In the remote interaction scenario of industrial equipment, how to ensure that the control command with the validity period of the message reaches the destination device in a timely manner during transmission, especially when no connection is established between the initiator and the destination or the connection is disconnected.

Method used

By obtaining the forwarding information of the destination device, including the information of the forwarding device, the message with the validity period of the message is preferred to send the message to the destination device and the forwarding device, and multiple paths are used to improve the success rate of message arrival.

Benefits of technology

Improves the success rate of messages reaching the destination device during the validity period, and solves the problem of message timeout or not delivered due to unestablished or disconnected connection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117118940B_ABST
    Figure CN117118940B_ABST
Patent Text Reader

Abstract

The embodiment of the present application proposes a message transmission method, device, system and storage medium, the message transmission method comprising: obtaining forwarding information corresponding to a destination device, the forwarding information comprising information of a forwarding device, the forwarding device being a device capable of forwarding messages within a message validity period to the destination device; and sending a message with a message validity period to the destination device and the forwarding device according to the forwarding information. The method sends a message with a message validity period to the destination device via multiple paths, thereby improving the success rate of messages within the validity period reaching the destination device.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The embodiments of the present application relate to the field of communication technology, and in particular, to a message transmission method, device, system and storage medium. [Background technology]

[0002] Industrial equipment has scenarios where it is necessary to remotely send control commands with message validity periods to target devices for execution: Figure 1 A schematic diagram of a scenario of remote interaction of industrial equipment provided in an embodiment of the present application, such as Figure 1 As shown, during coal mine production, the ground dispatch room or the underground centralized control center will remotely monitor the operating status of the mine equipment in real time. When the monitoring personnel of the centralized control center find that there is an abnormality in the equipment underground, they will send a control instruction with the validity period of the message to the operating machine, such as sending an "emergency stop" command directly to the "coal mining machine". The validity period of the command is 50ms. During the transmission process, it will be routed and transferred through switches and other equipment. If the time received by the destination machine exceeds 50ms, the command message needs to be ignored. In the prior art, the initiating centralized control center will directly send the command message to the designated destination operating machine.

[0003] Since the initiating control center and the destination operating machine usually have very little information exchange, if the initiating control center and the destination operating machine have not established a connection before sending a command message or the established connection has not been disconnected for a long time, it is necessary to establish a connection before sending the message. The process of establishing the connection will be time-consuming, resulting in the command message not being sent or timing out to the destination operating machine. In addition, the command message may not be sent or time out to the destination operating machine due to various reasons such as network, connection or transmission between the initiating control center and the destination operating machine.

[0004] Therefore, for the remote transmission of time-sensitive messages, how to ensure the timeliness of message transmission is an urgent problem to be solved in this application. [Summary of the invention]

[0005] The embodiments of the present application provide a message transmission method, apparatus, system and storage medium, which can send messages with message validity periods to a destination device through multiple paths, thereby improving the success rate of messages reaching the destination device within the validity period.

[0006] In a first aspect, the present application provides a message transmission method, applied to an initiating device, comprising: obtaining forwarding information corresponding to a destination device, the forwarding information including information of a forwarding device, the forwarding device being a device capable of forwarding messages within a message validity period to the destination device; and sending a message with a message validity period to the destination device and the forwarding device according to the forwarding information.

[0007] In a possible implementation manner, the acquiring the forwarding information corresponding to the destination device includes: acquiring the forwarding information corresponding to the destination device from a server, or reading the received forwarding information corresponding to the destination device.

[0008] In one possible implementation, the forwarding information includes information of a target forwarding device that establishes a connection with the destination device via Ethernet, and sending a message with a message validity period to the destination device and the forwarding device based on the forwarding information includes: preferentially sending the message to the destination device and the target forwarding device based on the forwarding information.

[0009] In one possible implementation, the forwarding information includes first sub-forwarding information based on a first connection medium and second sub-forwarding information based on a second connection medium, and sending the message with a message validity period to the destination device and the forwarding device according to the forwarding information includes: sending the message to the destination device, the forwarding device corresponding to the first sub-forwarding information, and the forwarding device corresponding to the second sub-forwarding information according to the forwarding information, so that the forwarding device corresponding to the first sub-forwarding information forwards the message to the destination device through the first connection medium, and the forwarding device corresponding to the second sub-forwarding information forwards the message to the destination device through the second connection medium.

[0010] In a possible implementation, the message with the message validity period includes the message sending time and the message validity period, or the message validity period.

[0011] In a possible implementation manner, the message with the message validity period includes a message code.

[0012] In a second aspect, the present application provides a message transmission method, applied to a destination device, comprising: obtaining forwarding information, the forwarding information including information of a forwarding device, the forwarding device being a device capable of forwarding messages within a validity period to the destination device; and sending the forwarding information to a server or a preset device.

[0013] In a possible implementation manner, the acquiring the forwarding information includes: acquiring the forwarding information according to a preset connection requirement, where the preset connection requirement includes a preset medium requirement and / or a preset delay requirement.

[0014] In a possible implementation, the acquiring of the forwarding information includes: acquiring the forwarding information when the destination device accesses a network, or acquiring the forwarding information when a preset time has passed since the destination device last acquired the forwarding information.

[0015] In one possible implementation, the obtaining of forwarding information includes: screening forwarding devices that meet preset connection requirements among the devices that have established a connection with the destination device, and adding the information of the screened forwarding devices to the forwarding information; if the number of forwarding devices in the forwarding information does not meet the preset number requirement, searching for forwarding devices that meet the preset connection requirements according to a preset configuration file, and adding the information of the forwarding devices found to the forwarding information; if the number of forwarding devices in the forwarding information does not meet the preset number requirement, performing an active discovery process in the local area network where the destination device is located to discover forwarding devices that meet the preset connection requirements, and adding the information of the discovered forwarding devices to the forwarding information.

[0016] In a possible implementation, the screening of forwarding devices that meet the preset connection requirements among the devices that have established a connection with the destination device includes: determining a first type of device that meets the preset connection requirements among the devices that have established a connection with the destination device, adding information of the first type of device to the forwarding information, the first type of device being used to indicate a gateway device and a node device; if the number of forwarding devices in the forwarding information does not meet the preset number requirement, traversing a second type of device that meets the preset connection requirements among the devices that have established a connection with the destination device, the second type of device being used to indicate surrounding devices.

[0017] In a possible implementation, the method further includes: upon receiving a message with a message validity period, determining whether the message is a duplicate message; and executing the message or discarding the message according to a result of the determination.

[0018] In one possible implementation, the message includes characteristic information, and the characteristic information is used to indicate at least one of a message sending time, a message validity period, and a message encoding. Determining whether the message is a duplicate message includes: determining whether the message is a duplicate message based on the characteristic information of the message.

[0019] In a third aspect, an embodiment of the present application provides a message transmission method, which is applied to a forwarding device, including: receiving a message with a message validity period, determining a destination device to which the message is to be forwarded; determining whether the message is within the validity period of the message, and in response to the message being within the validity period of the message, forwarding the message to the destination device.

[0020] In one possible implementation, the message with a message validity period includes a message sending time and a message validity period, and determining whether the message is within the message validity period includes: obtaining a current time; and determining whether the message is within the message validity period based on the message sending time, the message validity period and the current time.

[0021] In one possible implementation, the message with a message validity period includes a message sending time and a message validity period, and determining whether the message is within the message validity period includes: obtaining a current time and a forwarding delay, where the forwarding delay is used to indicate the time required for the forwarding device to forward the message to the destination device; and determining whether the message is within the message validity period based on the current time, the forwarding delay, the message sending time, and the message validity period.

[0022] In a possible implementation, the message with a message validity period includes a message validity time, and determining whether the message is within the message validity period includes: obtaining a current time; and determining whether the message is within the message validity period based on the current time and the message validity time.

[0023] In one possible implementation, the message with a message validity period includes a message validity period, and determining whether the message is within the message validity period includes: obtaining a current time and a forwarding delay, the forwarding delay being used to indicate the time required for the forwarding device to forward the message to the destination device; and determining whether the message is within the message validity period based on the current time, the forwarding delay, and the message validity period.

[0024] In a possible implementation manner, the forwarding device includes a high priority transmission queue, and forwarding the message to the destination device includes: forwarding the message to the destination device through the high priority transmission queue.

[0025] In a fourth aspect, an embodiment of the present application provides an initiating device, comprising: at least one processor; a memory; wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the processor, enable the initiating device to execute the method of the first aspect.

[0026] In the fifth aspect, an embodiment of the present application provides a destination device, comprising: at least one processor; a memory; wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the processor, enable the destination device to execute the method of the second aspect.

[0027] In the sixth aspect, an embodiment of the present application provides a forwarding device, comprising: at least one processor; a memory; wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, and when the instructions are executed by the processor, the forwarding device executes the method of the third aspect.

[0028] In the seventh aspect, an embodiment of the present application also provides a message transmission system, including the initiating device of the fourth aspect, the destination device of the fifth aspect, and the forwarding device of the sixth aspect.

[0029] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method provided in the first aspect, the second aspect, or the third aspect.

[0030] In a ninth aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method of the first aspect, the second aspect, or the third aspect.

[0031] The message transmission method provided in the present application sends messages with message validity periods to a destination device through multiple paths, thereby improving the success rate of messages reaching the destination device within the validity period.

Brief Description of the Drawings

[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 A schematic diagram of a scenario of remote interaction of industrial equipment provided in an embodiment of the present application;

[0034] Figure 2 A schematic diagram of the structure of an electronic device is provided for an embodiment of the present application;

[0035] Figure 3 A schematic diagram of a flow chart of a message transmission method provided in an embodiment of the present application;

[0036] Figure 4 A schematic diagram of a scenario in which an initiating device sends a message provided in an embodiment of the present application;

[0037] Figure 5 A schematic diagram of a flow chart of a message transmission method provided in an embodiment of the present application;

[0038] Figure 6 A schematic diagram of a scenario in which a destination device obtains forwarding information provided in an embodiment of the present application;

[0039] Figure 7 A schematic diagram of a flow chart of a message transmission method provided in an embodiment of the present application;

[0040] Figure 8A schematic diagram of a scenario in which a forwarding device forwards information provided in an embodiment of the present application. [Specific implementation method]

[0041] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0042] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0043] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0044] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0045] Before a detailed introduction to the embodiments of the present application, the terms that are applied or may be applied to the embodiments of the present application are first explained.

[0046] IP, which stands for Internet Protocol in English, is the network layer protocol in the TCP / IP system.

[0047] CAN, which stands for Controller Area Network in English, is one of the most widely used field buses in the world.

[0048] RS485, or Recommended Standard 485 in English, is a serial communication standard. The RS485 bus is a standard that defines the electrical characteristics of drivers and receivers in a balanced digital multi-point system. The standard is defined by the Telecommunications Industry Association and the Electronic Industries Alliance.

[0049] In the scenario of remote monitoring and remote control of remote devices, when an emergency occurs, the initiating device needs to remotely send a control command with a time validity period to the destination device for execution. The existing method is for the initiating device to directly send a command message to the specified destination device.

[0050] Since the initiating device and the destination device usually have very little information exchange, if the initiating device and the destination device have not established a connection before sending a command message or the established connection has been disconnected due to no communication for a long time, it is necessary to re-establish the connection and then send the message. The process of establishing the connection is time-consuming, which affects the timely delivery of the command message. In addition, the command message between the initiating device and the destination device may not be sent to the destination device or may time out due to various reasons such as network, connection or transmission.

[0051] In response to the above problems, an embodiment of the present application provides a message transmission method. When an initiating device sends a message with a message validity period to a destination device, firstly, the forwarding information corresponding to the destination device is obtained. The forwarding information includes information of a forwarding device. The forwarding device is a device that can forward messages within the message validity period to the destination device. Then, according to the forwarding information, the message with the message validity period is sent to the destination device and the forwarding device. In the present application, messages with a message validity period are sent to the destination device and the forwarding device at the same time through multiple paths, thereby improving the success rate of messages within the validity period reaching the destination device. The following is a detailed description.

[0052] See also Figure 2 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, and the device may be an initiating device, a destination device or a forwarding device in the following embodiments. Figure 2 As shown, the electronic device 100 includes: a processor 110, a memory 120, and a communication interface 130. Optionally, the electronic device 100 may further include a bus 140. The communication interface 130, the processor 110, and the memory 120 may be interconnected via the bus 140; the bus 140 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 140 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 2 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0053] The processor 110 may be a CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the present application.

[0054] The communication interface 130 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, RAN, wireless local area networks (WLAN), wired access networks, etc.

[0055] The memory 120 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via the bus 140. The memory may also be integrated with the processor.

[0056] The memory 120 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 110. The processor 110 is used to execute the computer-executable instructions stored in the memory 120, thereby realizing the message transmission method provided in the above embodiment of the present application.

[0057] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.

[0058] The following is a detailed introduction to the initiator device. Figure 3 , is a flow chart of a message transmission method provided in an embodiment of the present application. The method can be applied to Figure 2 The initiator device shown. The method comprises:

[0059] Step 101: Acquire forwarding information corresponding to the destination device, where the forwarding information includes information of a forwarding device, and the forwarding device is a device capable of forwarding a message within a validity period of the message to the destination device.

[0060] In an embodiment of the present application, when the initiating device is preparing to send a time-sensitive message to the destination device, such as sending a command message with a message validity period, it first obtains the forwarding information corresponding to the destination device. Based on the information of the forwarding device in the forwarding information, the message attempted to be sent to the destination device can be sent to the forwarding device corresponding to the destination device at the same time. Since the forwarding device can forward the message within the validity period to the destination device, it is possible to realize multi-path sending of messages to the destination device.

[0061] Exemplarily, the forwarding information may include information such as the device name, device type, device address, and connection medium with the destination device of the forwarding device. The forwarding information may be in the form of a device information list, etc. As long as the initiating device can obtain the information of the forwarding device based on the forwarding information, this application does not limit the content and form of the forwarding information.

[0062] In an embodiment of the present application, there are many forms of messages with message validity periods. For example, it may be a message with a message sending time and a message validity period, wherein the message sending time is used to indicate the time when the initiating device sends the message, and the message validity period is used to indicate the time range within which the message is valid after the initiating device sends the message. For example, when the message sending time is time A and the message validity period is 50ms, it means that the message is valid if it arrives at the destination device within 50ms from time A, otherwise it is invalid; a message with a message validity period may also be a message with a message validity period, and the message validity period is used to indicate a specific time point, that is, if the message arrives at the destination device before the message validity period, the message is valid, otherwise it is invalid; wherein the message sending time and the message validity period may be in the form of a timestamp or other forms. In addition, a message with a message validity period may also be in other forms. The present application does not specifically limit the form of a message with a message validity period.

[0063] Exemplarily, the destination device and the forwarding device corresponding to the destination device constitute a message cluster group centered on the destination device. When the initiating device attempts to send a time-sensitive message to the destination device, it obtains forwarding information centered on the destination device, that is, obtains information about the message cluster group. For example, when the message cluster group centered on the destination device includes the destination device, forwarding device A, forwarding device B and forwarding device C, the initiating device will send the message to the destination device, forwarding device A, forwarding device B and forwarding device C at the same time when sending a message to the destination device. Since forwarding device A, forwarding device B and forwarding device C can forward messages within the validity period to the destination device, the success rate of the message reaching the destination device within the validity period is improved.

[0064] As a possible implementation manner, the acquiring the forwarding information corresponding to the destination device may include: acquiring the forwarding information corresponding to the destination device from a server, or reading the received forwarding information corresponding to the destination device.

[0065] It should be noted that the initiating device may obtain the forwarding information corresponding to the destination device from a server, such as a central server, that is, the destination device has sent its corresponding forwarding information to the central server, and the initiating device may directly obtain the forwarding information corresponding to the destination device from the central server; the initiating device may also read the received forwarding information, that is, the destination device has already sent its corresponding forwarding information to possible initiating devices or specific types of devices in advance, and has received the forwarding information sent by the destination device before the initiating device sends the message, so the initiating device may directly read the forwarding information received previously and obtain the forwarding information corresponding to the destination device; the initiating device may also obtain the forwarding information corresponding to the destination device in other ways, and this application does not make any specific limitations on this.

[0066] Step 102: Send the message with the message validity period to the destination device and the forwarding device according to the forwarding information.

[0067] In an embodiment of the present application, after the forwarding information is obtained, the message can be sent to the destination device and the forwarding device at the same time according to the forwarding information. For example, the initiating device obtains the device names, device addresses and other information of the three forwarding devices according to the forwarding information, and then the message can be sent to the destination device and the three forwarding devices at the same time. As a possible implementation method, the forwarding information includes information of the target forwarding device that establishes a connection with the destination device via Ethernet, and the sending of the message with a message validity period to the destination device and the forwarding device according to the forwarding information may include: preferentially sending the message to the destination device and the target forwarding device according to the forwarding information.

[0068] As a possible implementation method, the forwarding information includes information of a target forwarding device that establishes a connection with the destination device via Ethernet, and sending a message with a message validity period to the destination device and the forwarding device according to the forwarding information may include: preferentially sending the message to the destination device and the target forwarding device according to the forwarding information.

[0069] In an embodiment of the present application, the forwarding information may include a forwarding device that establishes a connection with the destination device through different connection media, such as Ethernet, CAN bus, RS485 and other connection media, among which the Ethernet connection method is relatively fast, stable and secure. Therefore, when the initiating device sends a time-sensitive message to the forwarding device, it can be sent preferentially to the target forwarding device connected via Ethernet or Ethernet IP to ensure the timeliness of the target forwarding device forwarding the message to the destination device, thereby improving the success rate of the destination device receiving the message within the validity period.

[0070] As a possible implementation method, the forwarding information includes first sub-forwarding information based on a first connection medium and second sub-forwarding information based on a second connection medium. Sending the message with a message validity period to the destination device and the forwarding device according to the forwarding information may include: sending the message to the destination device, the forwarding device corresponding to the first sub-forwarding information, and the forwarding device corresponding to the second sub-forwarding information according to the forwarding information, so that the forwarding device corresponding to the first sub-forwarding information forwards the message to the destination device through the first connection medium, and the forwarding device corresponding to the second sub-forwarding information forwards the message to the destination device through the second connection medium.

[0071] In an embodiment of the present application, the forwarding information may include multiple sub-forwarding information based on different connection media, or multiple message cluster groups based on different connection media, for example, a message cluster group connected via Ethernet, a message cluster group connected via Bluetooth, etc. Since each sub-forwarding information corresponds to a different connection medium, for example, the first sub-forwarding information includes information about a forwarding device connected to the destination device via Ethernet, and the second sub-forwarding information includes information about a forwarding device connected to the destination device via a CAN bus, when the message is sent to the forwarding device according to the forwarding information, the message can be sent to the forwarding devices corresponding to the multiple sub-forwarding information at the same time, so that the multiple forwarding devices forward the message within the validity period to the destination device through different connection media after receiving the message, so as to improve the success rate of the destination device receiving the message within the validity period.

[0072] As a possible implementation manner, the message with the message validity period includes the message sending time and the message validity period, or the message with the message validity period includes the message validity period.

[0073] It should be noted that messages with message validity periods have multiple forms. For example, one form of the message may include a message sending time and a message validity period. The message sending time is used to indicate the time information when the initiating device sends the message, and the message validity period is used to indicate the length of time the message remains valid after the initiating device sends the message. Another form of the message may include a message validity period, and the message validity period is used to indicate the latest time information during which the message remains valid. In addition, the message with a message validity period may also take other forms, which are not specifically limited in the present application.

[0074] As a possible implementation manner, the message with the message validity period includes a message code.

[0075] It should be noted that the message with the message validity period may also include a message code, which is a unique code or number set by the initiating device for each message sent to distinguish different messages. The message code can help the destination device determine whether the received message is a duplicate message, thereby determining whether to discard or execute it.

[0076] See also Figure 4 , is a schematic diagram of a scenario in which an initiating end device sends a message provided in an embodiment of the present application. Figure 4 As shown, before the initiating device control center sends a command message with an "effective period" to the destination device A, it searches whether the destination device A has forwarding information centered on the destination device A, which can also be called message cluster group information; if the message cluster group information exists, the command message with the "effective period" is sent to all devices in the message cluster group through the connection medium, and all devices include the destination device and the forwarding device; if multiple message cluster group information exists at the same time, the control center needs to send the command message to all devices in the multiple message cluster groups, that is, including the destination device and multiple forwarding devices in the message cluster groups centered on the destination device A; if the message cluster group information does not exist, the regular connection sending process is executed to directly send the command message to the destination device A.

[0077] exist Figure 4In the process, the initiating device, i.e., the centralized control center, retrieved the message cluster group through the destination device A and found two message cluster groups: Ethernet IP message cluster group and Bluetooth and other message cluster groups. Among them, the Ethernet IP message cluster group includes the destination device A, forwarding device B and forwarding device C, and the Bluetooth and other message cluster groups include the destination device A, forwarding device D and forwarding device E. Therefore, when the centralized control center sends a command message to the destination device A, it also sends the command message to the destination device A, forwarding device B, forwarding device C, forwarding device D and forwarding device E at the same time, so that multiple forwarding devices forward the command message to the destination device. It can be understood that when the centralized control center sends a command message to the destination device A and multiple forwarding devices, it can also give priority to sending the command message to the destination device A, the forwarding device B and the forwarding device C in the Ethernet IP message cluster group, so as to improve the success rate of the command message reaching the destination device.

[0078] The following is a detailed introduction to the destination device. Figure 5 , is a flow chart of a message transmission method provided in an embodiment of the present application. The method can be applied to Figure 2 The method comprises:

[0079] Step 201: Acquire forwarding information, where the forwarding information includes information of a forwarding device, where the forwarding device is a device capable of forwarding a message within a validity period to the destination device.

[0080] In the embodiment of the present application, the destination device can form a message cluster group centered on the destination device with multiple forwarding devices based on the requirements of connection delay, connection medium, etc., so as to generate message cluster group information, also called forwarding information, wherein the connection medium is not limited to Ethernet IP, CAN, RS485, infrared, Bluetooth, etc., and there is at least one short-delay connection between each forwarding device and the destination device. Among them, the forwarding information may include the device name, device type, device address, connection medium with the destination device, connection delay and other information of the forwarding device, and the forwarding information may be in the form of a device information list, etc. As long as the initiating device can obtain the information of the forwarding device according to the forwarding information, the present application does not limit the content and form of the forwarding information.

[0081] Step 202: Send the forwarding information to a server or a preset device.

[0082] In the embodiment of the present application, after the destination device obtains the forwarding information, it needs to notify the initiating device of the forwarding information, but at this time the destination device and the initiating device have not yet communicated, so the destination device does not determine which device is the initiating device, so the forwarding information can be sent to the server, for example, it can be the central server of the network. Since both the initiating device and the destination device can communicate with the server, when the initiating device wants to send a message to the destination device, it can obtain the forwarding information corresponding to the destination device from the server; another way is that the destination device sends the forwarding information to a preset device, where the preset device can be a preset type of device, a preset address of a device or a specific type of device, that is, a device that may serve as an initiating device. If the destination device sends the forwarding information to all preset types or specific types of devices in the network in a group or broadcast manner, it is equivalent to sending the forwarding information to the initiating device. It can be understood that when the destination device obtains the forwarding information, it sends the forwarding information to the central server or the preset device in the network, so as to notify the initiating device of the forwarding information.

[0083] As a possible implementation manner, the acquiring of the forwarding information may include: acquiring the forwarding information according to a preset connection requirement, where the preset connection requirement includes a preset medium requirement and / or a preset delay requirement.

[0084] In an embodiment of the present application, when the destination device obtains forwarding information, it can determine the device that can be used as a forwarding device according to the preset connection requirements to obtain the forwarding information. The preset connection requirements may include preset delay requirements and / or preset medium requirements. For example, when the preset connection requirements include preset medium requirements and preset delay requirements, the preset medium requirements are Ethernet, and the preset delay requirements are 2ms, the destination device establishes a connection with the device in the network through Ethernet, and tests the connection delay. For devices with a connection delay of less than 2ms, it is considered that it can be used as a forwarding device, and its information is added to the forwarding information. If the preset medium requirements include Ethernet and CAN bus, then in addition to determining the forwarding information corresponding to Ethernet, the forwarding information corresponding to the CAN bus must also be determined, that is, forwarding information based on two connection media is generated; when the preset connection requirements only include preset delay requirements, and the preset delay requirement is 2ms, the destination device can establish a connection with the device in the network through different connection media, and test the connection delay. For devices with a connection delay of less than 2ms, it is considered that it can be used as a forwarding device, and its information is added to the forwarding information. Obtaining forwarding information by means of preset medium requirements and / or preset delay requirements can ensure the timeliness of forwarding messages by the forwarding device.

[0085] As a possible implementation manner, the acquiring of the forwarding information may include: acquiring the forwarding information when the destination device accesses the network, or acquiring the forwarding information when the time since the destination device last acquired the forwarding information reaches a preset time.

[0086] In the embodiments of the present application, the destination device can obtain forwarding information in two ways. One is that when the destination device is online, it obtains updated forwarding information according to the current network situation and sends it to the server or a preset type of device to ensure the accuracy of the forwarding information. The other situation is that the destination device has reached a preset time since the last time it obtained forwarding information. At this time, the network situation may have changed. In this case, the destination device can obtain updated forwarding information and then send it to the server or a preset type of device to ensure the accuracy of the forwarding information. For example, the destination device can refresh the forwarding information according to the connection, delay, etc. at a certain period, such as 2 hours as a period, that is, re-determine the forwarding device to generate updated forwarding information and send it to the server or preset device.

[0087] It is understandable that the above two methods of triggering the acquisition of forwarding information can be used separately or simultaneously. In addition, other methods can also be used to trigger the operation of obtaining forwarding information, and this application does not make specific limitations on this.

[0088] As a possible implementation method, obtaining forwarding information may include: screening forwarding devices that meet preset connection requirements among devices that have established connections with the destination device, and adding information of the screened forwarding devices to the forwarding information; if the number of forwarding devices in the forwarding information does not meet the preset number requirement, searching for forwarding devices that meet the preset connection requirements according to a preset configuration file, and adding information of the forwarding devices found to the forwarding information; if the number of forwarding devices in the forwarding information does not meet the preset number requirement, performing an active discovery process in the local area network where the destination device is located to discover forwarding devices that meet the preset connection requirements, and adding information of the discovered forwarding devices to the forwarding information.

[0089] In an embodiment of the present application, when the destination device obtains forwarding information, it can first determine the device corresponding to the existing connection in the device, give priority to the device with established connection as the target device, and add the information of the target device that meets the preset connection requirements to the forwarding information. In addition, the destination device has a preset number requirement for the forwarding device, and the specific number requirement can be set according to the demand. For example, the preset number requirement is 3. If the number of devices currently added to the forwarding information is less than 3, the target node device or the peripheral device is searched for according to the preset configuration file to establish a connection. The preset configuration file may include the address, name and other information of the device. The destination device can search for the corresponding device according to the information in the configuration file, and add the information of the device that meets the preset connection requirements to the forwarding information. If after executing the above two processes, the number of devices in the forwarding information is still less than the preset number requirement, the active discovery process in the device local area network is finally executed to establish a connection with the peripheral devices found in the local area network, and the connection delay and other parameters are judged according to the preset connection requirements, and the devices that meet the preset connection requirements are added to the forwarding information. If the preset number of forwarding devices has been obtained after executing the first or first two processes, there is no need to execute the subsequent processes, and the forwarding information has been obtained; if the number of forwarding devices determined after executing three processes still does not meet the preset number requirements, the search for forwarding devices will no longer continue. After adding the information of the currently determined forwarding device to the forwarding information, the forwarding information will be obtained.

[0090] Furthermore, the screening of forwarding devices that meet the preset connection requirements among the devices that have established a connection with the destination device may include: determining a first type of device that meets the preset connection requirements among the devices that have established a connection with the destination device, adding information of the first type of device to the forwarding information, the first type of device being used to indicate a gateway device and a node device; if the number of forwarding devices in the forwarding information does not meet the preset number requirement, traversing a second type of device that meets the preset connection requirements among the devices that have established a connection with the destination device, the second type of device being used to indicate surrounding devices.

[0091] It should be noted that when judging the device corresponding to the existing connection in the device, the device of the first type of device that has established the connection and meets the preset connection requirements is preferentially used as the forwarding device. The first type of device may include gateway devices, central node devices, and console node devices, etc. If the first type of device is less than the preset number requirement, the second type of device that has established the connection is traversed. The second type of device may include peripheral devices, etc. All the traversed peripheral devices that meet the preset connection requirements are added to the forwarding device information, and then it is judged whether the number of devices in the forwarding information meets the preset number requirement. If the number of forwarding devices in the forwarding information does not meet the preset number requirement, the subsequent process is continued to obtain the forwarding information.

[0092] It is understandable that the method for the destination device to obtain forwarding information is a process for obtaining forwarding information for a connection medium. For other connection media, similar methods can also be used to obtain information, which will not be repeated here. In addition, the preset number of forwarding devices can be set according to demand, and the specific number of forwarding devices obtained depends on the number of forwarding devices that the destination device discovers and identifies through the above process and can establish an effective low-latency connection with the destination device. At the same time, the destination device can also dynamically adjust the number of forwarding devices according to the connection status, etc.

[0093] See also Figure 6 , is a schematic diagram of a scenario in which a destination device obtains forwarding information provided by an embodiment of the present application. Figure 6 As shown, after the destination device A is online or the time from the last forwarding information acquisition reaches the preset time, the process of acquiring forwarding information is started to acquire the latest forwarding information. First, the device corresponding to the existing connection in the device is determined, and the gateway device-forwarding device B that meets the preset connection requirements is determined through the existing connection, the central node device-forwarding device C is determined, the console node device-forwarding device D, and the peripheral device-forwarding device E are determined. After executing the first process, that is, screening the forwarding devices that meet the preset connection requirements in the devices that have established a connection with the destination device, 4 forwarding devices have been obtained. Since the preset number of forwarding devices is 3 devices, there is no need to execute the following steps. According to the determined 4 forwarding devices, message cluster group information, that is, forwarding information, is generated, and the forwarding information is sent to the server or the preset device-central control center, so that the destination device obtains updated forwarding information and notifies the destination device.

[0094] As a possible implementation manner, the method further includes: upon receiving a message with a message validity period, determining whether the message is a duplicate message; and executing the message or discarding the message according to a result of the determination.

[0095] In an embodiment of the present application, since the initiating device will send the same message to the destination device and multiple forwarding devices at the same time when sending a time-sensitive message to the destination device, the destination device may receive multiple identical messages at the same time. Therefore, after receiving the message, it is necessary to determine whether the message is a duplicate message, and determine whether to filter or execute the message based on the result of the judgment. If it is a duplicate message, it can be discarded directly. If it is not a duplicate message, the message is executed.

[0096] Further, the message includes characteristic information, and the characteristic information is used to indicate at least one of the message sending time, the message validity period and the message encoding. The determining whether the message is a duplicate message may include: determining whether the message is a duplicate message according to the characteristic information of the message.

[0097] In an embodiment of the present application, the method used to determine whether the message is a duplicate message may be, after receiving the message, obtaining the characteristic information of the message, comparing the characteristic information with the stored characteristic information, if there is the same characteristic information, it means that the message is a duplicate message, and the message can be directly discarded, if there is no same characteristic information, the message is executed, and the characteristic information of the message is stored for comparison with the message received later. According to this method, after the destination device receives the message for the first time and processes it, the characteristic information of the message is stored, and when the message is received later, it is determined whether the characteristic information of the message has been received according to the stored characteristic information, if it is, it means that the message is a duplicate message, and it is no longer processed and discarded. Exemplarily, when the destination device receives a message, it first extracts the characteristic information in the message for judgment, if it has not been received before or has not received a message containing the characteristic information within a certain period of time before, the message is executed and processed, if the message containing the characteristic information has been received, it is considered to be a duplicate message and discarded, and the use of this method can avoid the destination device from repeatedly processing duplicate messages, resulting in resource waste or command execution errors.

[0098] It should be noted that the characteristic information of the message includes at least one of the message sending time, the message effective time and the message code. Since the initiating device sends a time-sensitive message, at least one of the message sending time, the message effective time and the message code can be used as the characteristic information of the message. For example, one kind of characteristic information can be the message sending time or the message effective time. Since time-sensitive messages are not sent frequently, it can be determined whether it is a duplicate message based on the message sending time or the message effective time; one kind of characteristic information can be the message code. Each message is provided with a unique message code. It can be determined whether it is a duplicate message based on the message code; another kind of characteristic information can be the message sending time and the message code, or the message effective time and the message code. It can be determined more accurately whether the message is a duplicate message by making a judgment based on the two kinds of information at the same time. Therefore, it can be determined whether the received message is a duplicate message based on at least one characteristic information of the message sending time, the message effective time and the message code, so as to decide whether to discard or execute.

[0099] The following is a detailed introduction to forwarding devices. Figure 7, is a flow chart of a message transmission method provided in an embodiment of the present application. The method can be applied to Figure 2 The forwarding device shown. The method may include:

[0100] Step 301: receiving a message with a message validity period, and determining a destination device to which the message is to be forwarded.

[0101] In an embodiment of the present application, when a forwarding device receives a message, it can determine the address and other information of the forwarding destination device based on the destination device information field in the message. In addition, the destination device information can also be obtained by other means, which is not specifically limited in the present application.

[0102] Step 302: Determine whether the message is within the validity period of the message, and in response to the message being within the validity period of the message, forward the message to the destination device.

[0103] In an embodiment of the present application, after the forwarding device receives the information, it can also determine that the message is a message with a message validity period, that is, a time-sensitive message, based on the validity period information field in the message. Before the forwarding device forwards the time-sensitive message to the destination device, it can determine whether the message is within the validity period based on the content of the validity period information field. If it is within the validity period, the message will be forwarded to the destination device. If it is not within the validity period, the message will be discarded and no forwarding action will be performed.

[0104] As a possible implementation method, the message with a message validity period includes the message sending time and the message validity period, and determining whether the message is within the message validity period may include: obtaining the current time; and determining whether the message is within the message validity period based on the message sending time, the message validity period and the current time.

[0105] It should be noted that when a message with a message validity period includes the message sending time and the message validity period, the forwarding device determines whether the message is within the message validity period. It needs to obtain the current time, then read the message sending time and the message validity period carried by the message, and calculate the difference between the current time and the message sending time to obtain the message transmission time. The message transmission time is then compared with the message validity period. If the message transmission time is less than the message validity period, it means that the message is still within the validity period and the message can be forwarded to the destination device immediately. If the message transmission time is greater than the message validity period, it means that the message has exceeded the validity period and is invalid, so the message is directly discarded.

[0106] Furthermore, when the message with a message validity period includes a message sending time and a message validity period, determining whether the message is within the message validity period may also include: obtaining a current time and a forwarding delay, wherein the forwarding delay is used to indicate the time required for the forwarding device to forward the message to the destination device; and determining whether the message is within the message validity period based on the current time, the forwarding delay, the message sending time, and the message validity period.

[0107] It should be noted that when the forwarding device receives the message, the message may just be within the validity period. However, since there is a delay in forwarding the message from the forwarding device to the destination device, when the destination device receives the forwarded message, the message has exceeded the validity period, so there is no need for the forwarding device to forward the message to the destination device. Therefore, the forwarding device can obtain the current time and forwarding delay, read the message sending time and the message validity period of the message, calculate the difference between the current time and the message sending time, and then add the forwarding delay to obtain the message transmission time, and then compare the message transmission time with the message validity period. If the message transmission time is less than the message validity period, it means that the message is still within the validity period, and the message can be forwarded to the destination device immediately. If the message transmission time is greater than the message validity period, it means that the message has exceeded the validity period when it is forwarded to the destination device and is invalid, then the message is directly discarded. The above method can prevent the forwarding device from making invalid forwarding, further saving the resources of the forwarding device.

[0108] Among them, there are many ways for the forwarding device to obtain the forwarding delay. One way is direct reading. When the destination device establishes a connection with the forwarding device and obtains the forwarding information, the forwarding device has already obtained the connection delay information. Therefore, the forwarding device can directly read the forwarding delay information. Another way is that the forwarding device can obtain the connection delay information by establishing a connection with the destination device. In addition, the connection delay can also be obtained in other ways, and this application does not make specific limitations on this.

[0109] As a possible implementation, the message with a message validity period includes a message validity time, and determining whether the message is within the message validity period may include: obtaining a current time; and determining whether the message is within the message validity period based on the current time and the message validity time.

[0110] It should be noted that when a message with a message validity period includes a message validity time, the forwarding device needs to obtain the current time and then read the message validity time included in the message. The message validity time is used to indicate the latest time when the message is valid. The current time is compared with the message validity time. If the current time is less than the message validity time, it means that the message is still within the validity period and the message can be forwarded to the destination device immediately. If the current time is greater than the message validity time, it means that the message has exceeded the validity time and is invalid, then the message will be directly discarded.

[0111] Furthermore, the message with a message validity period includes a message validity time, and determining whether the message is within the message validity period includes: obtaining a current time and a forwarding delay, the forwarding delay being used to indicate the time required for the forwarding device to forward the message to the destination device; and determining whether the message is within the message validity period based on the current time, the forwarding delay and the message validity time.

[0112] It should be noted that since the forwarding device does not need to forward to the destination device a message that has just exceeded its validity period when it reaches the destination device. Therefore, the forwarding device can obtain the current time and the forwarding delay, read the message validity period of the message, which is used to indicate the latest time when the message is valid, add the forwarding delay to the current time to get the estimated delivery time, and compare the estimated delivery time with the message validity period. If the estimated delivery time is less than the message validity period, it means that the message is still within the validity period when it is delivered to the destination device, and the message can be forwarded to the destination device immediately. If the estimated delivery time is greater than the message validity period, it means that the message has exceeded its validity period when it arrives at the destination device and is invalid, and the message is directly discarded. The above method can prevent the forwarding device from making invalid forwarding, further saving the resources of the forwarding device.

[0113] As a possible implementation manner, the forwarding device includes a high priority transmission queue, and forwarding the message to the destination device may include: forwarding the message to the destination device through the high priority transmission queue.

[0114] It should be noted that the forwarding device includes multiple transmission queues with different priorities for transmitting messages. When the forwarding device forwards a message to a destination device, the message can be placed in a high-priority transmission queue so that the message can be transmitted to the destination device at the fastest speed, thereby ensuring the timeliness of the message arriving at the destination device.

[0115] As a possible implementation manner, the forwarding device includes a first forwarding device based on a first connection medium and a second forwarding device based on a second connection medium, and forwarding the message to the destination device may include: the first forwarding device forwards the message to the destination device via the first connection medium, and the second forwarding device forwards the message to the destination device via the second connection medium.

[0116] It should be noted that the forwarding device may include multiple forwarding devices connected to the destination device based on different connection media. When each forwarding device forwards a message to the destination device, it can forward the message to the destination device based on the connection medium established with the destination device. Different forwarding devices can send messages in parallel. For example, multiple forwarding devices can forward messages to the destination device through multiple connection paths such as Ethernet IP and Bluetooth. In addition, each forwarding device may be connected to the destination device based on multiple connection media. When a single forwarding device forwards a message to the destination device, it can forward the message to the destination device based on multiple connection media. For example, forwarding device B can forward the message to the destination device through multiple connection paths such as Ethernet IP and Bluetooth. The multi-path message forwarding method of the forwarding device improves the success rate of the message reaching the destination device within the validity period.

[0117] See also Figure 8 , is a schematic diagram of a scenario in which a forwarding device forwards information provided in an embodiment of the present application. Figure 8As shown, when the initiating device wants to send a message with a message validity period to the destination device, it obtains the forwarding information corresponding to the destination device A, and determines that the forwarding devices corresponding to the destination device include forwarding device B and forwarding device C, wherein forwarding device B can forward messages to the destination device through two connection media Ethernet IP and Bluetooth, and forwarding device B can also forward messages to the destination device through two connection media Ethernet IP and Bluetooth. When the initiating device sends a command message with a message validity period to the destination device, the command message is sent through multiple paths, that is, the command message is sent to the destination device A, the forwarding device B and the forwarding device C at the same time. After receiving the command message, the forwarding device B determines whether the destination device and the command message corresponding to the command message are still valid. If the message is still valid, the command message is forwarded through multiple paths, that is, the command message is forwarded to the destination device through Ethernet IP forwarding and Bluetooth at the same time. After receiving the command message, the forwarding device C determines whether the destination device and the command message corresponding to the command message are still valid. If the message is still valid, the command message is forwarded through multiple paths, that is, the command message is forwarded to the destination device through Ethernet IP forwarding and Bluetooth at the same time. After receiving the command message, the destination device determines whether it is a duplicate message. If it is not a duplicate message, the command message is executed. If it is a duplicate message, the duplicate message is discarded or other deduplication processing is performed. Through the above process, the initiating device sends the command message through multiple paths, and the forwarding device forwards the command message to the destination device through multiple paths, which improves the success rate of the command message reaching the destination device within the validity period.

[0118] It is understandable that the initiator device, destination device, and forwarding device mentioned in the above embodiments are names based on the roles of the devices in the communication scenarios, and are not used to limit the three types of devices. An electronic device can work in different roles in different communication scenarios. For example, an electronic device can be used as an initiator device in one communication scenario, as a destination device in another communication scenario, and as a forwarding device in another scenario. Therefore, the initiator device, destination device, and forwarding device in the embodiments of the present application do not limit the devices, but are only used to distinguish devices with different roles and facilitate the introduction of technical solutions.

[0119] The message transmission method provided in the embodiment of the present application can be applied to multi-device communication scenarios such as coal, oil, and natural gas mining, underground operations, offshore operations, smart factory operations, and remote operation control. For example, it can be a communication scenario in which multiple industrial devices interact, a communication scenario in which multiple Internet of Things devices interact, and so on. As long as there is at least one device that can be used for forwarding between the initiating device and the destination device, the message transmission method provided in the embodiment of the present application can be used. The present application does not limit the application scenario of the message transmission method.

[0120] It is to be understood that some or all of the steps or operations in the above embodiments are merely examples, and the present application embodiments may also perform other operations or variations of various operations. In addition, the various steps may be performed in different orders presented in the above embodiments, and it is possible that not all of the operations in the above embodiments need to be performed.

[0121] The present application also provides a message transmission system, which includes the initiator device, destination device and forwarding device in the above embodiment. The introduction of the initiator device, destination device and forwarding device can refer to the description in the above embodiment, which will not be repeated here.

[0122] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed on an electronic device, the electronic device executes the aforementioned message transmission method.

[0123] The above-mentioned computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0124] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0125] The program code embodied on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0126] Computer program code for performing the operations of the present specification may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0127] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute part or all of the steps in the above method embodiment.

[0128] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0129] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A message transmission method, It is characterized in that Applicable to the initiator device, including: Obtaining forwarding information corresponding to a destination device, the forwarding information including information of a forwarding device, the forwarding device being a device capable of forwarding a message within a message validity period to the destination device, and a connection that meets a preset connection requirement exists between the forwarding device and the destination device; the preset connection requirement includes a preset connection medium requirement and / or a preset delay requirement; A message with a message validity period is sent to the destination device and the forwarding device according to the forwarding information. The forwarding device is used to forward the message with a message validity period to the destination device through a connection with the destination device that meets preset connection requirements when the message with a message validity period is within the message validity period.

2. The method according to claim 1, It is characterized in that The obtaining of the forwarding information corresponding to the destination device includes: The forwarding information corresponding to the destination device is obtained from the server, or the received forwarding information corresponding to the destination device is read.

3. The method according to claim 1, It is characterized in that The forwarding information includes information of a target forwarding device that establishes a connection with the destination device via Ethernet, and sending a message with a message validity period to the destination device and the forwarding device according to the forwarding information includes: The message is preferentially sent to the destination device and the target forwarding device according to the forwarding information.

4. The method according to claim 1, It is characterized in that The forwarding information includes first sub-forwarding information based on the first connection medium and second sub-forwarding information based on the second connection medium, and sending the message with the message validity period to the destination device and the forwarding device according to the forwarding information includes: According to the forwarding information, the message is sent to the destination device, the forwarding device corresponding to the first sub-forwarding information, and the forwarding device corresponding to the second sub-forwarding information, so that the forwarding device corresponding to the first sub-forwarding information forwards the message to the destination device through the first connection medium, and the forwarding device corresponding to the second sub-forwarding information forwards the message to the destination device through the second connection medium.

5. The method according to any one of claims 1 to 4, It is characterized in that The message with the message validity period includes the message sending time and the message validity period, or the message validity period.

6. The method according to any one of claims 1 to 4, It is characterized in that The message with the message validity period includes a message code.

7. A message transmission method, It is characterized in that Applied to the destination device, including: Acquire forwarding information, where the forwarding information includes information of a forwarding device, where the forwarding device is a device capable of forwarding messages within a validity period to the destination device, and a connection that meets a preset connection requirement exists between the forwarding device and the destination device; the preset connection requirement includes a preset connection medium requirement and / or a preset delay requirement; The forwarding information is sent to a server or a preset device, so that the initiating device sends the message with a message validity period to the destination device and the forwarding device according to the forwarding information. The forwarding device is used to forward the message with a message validity period to the destination device through a connection with the destination device that meets the preset connection requirements when the message with a message validity period is within the message validity period.

8. The method according to claim 7, It is characterized in that The obtaining of forwarding information includes: The forwarding information is obtained according to a preset connection requirement, where the preset connection requirement includes a preset medium requirement and / or a preset delay requirement.

9. The method according to claim 7, It is characterized in that The obtaining of forwarding information includes: The forwarding information is obtained when the destination device accesses the network, or when the time from the last time the destination device obtained the forwarding information reaches a preset time.

10. The method according to claim 7, It is characterized in that The obtaining of forwarding information includes: Screening a forwarding device that meets a preset connection requirement from among the devices that have established a connection with the destination device, and adding information of the screened forwarding device to the forwarding information; If the number of forwarding devices in the forwarding information does not meet the preset number requirement, searching for a forwarding device that meets the preset connection requirement according to a preset configuration file, and adding the information of the forwarding device found to the forwarding information; If the number of forwarding devices in the forwarding information does not meet the preset number requirement, an active discovery process is performed in the local area network where the destination device is located to discover forwarding devices that meet the preset connection requirements, and the information of the discovered forwarding devices is added to the forwarding information.

11. The method according to claim 10, It is characterized in that The step of selecting a forwarding device that meets a preset connection requirement from among the devices that have established a connection with the destination device includes: Determine a first type of device that meets the preset connection requirements among the devices that have established a connection with the destination device, and add information of the first type of device to the forwarding information, where the first type of device is used to indicate a gateway device and a node device; If the number of forwarding devices in the forwarding information does not meet the preset number requirement, a second type of device that meets the preset connection requirement is traversed from the devices that have established a connection with the destination device, and the second type of device is used to indicate a peripheral device.

12. The method according to claim 7, It is characterized in that Also includes: Receiving a message with a message validity period, determining whether the message is a duplicate message; The message is executed or discarded according to a result of the determination.

13. The method according to claim 12, It is characterized in that The message includes characteristic information, where the characteristic information is used to indicate at least one of a message sending time, a message validity period, and a message code, and determining whether the message is a duplicate message includes: Determine whether the message is a duplicate message according to the characteristic information of the message.

14. A message transmission method, It is characterized in that Applied to a forwarding device, there is a connection between the forwarding device and a destination device that meets a preset connection requirement; the preset connection requirement includes a preset connection medium requirement and / or a preset delay requirement; the method includes: Receiving a message with a message validity period, determining a destination device to which the message is to be forwarded; Determine whether the message is within the message validity period, and in response to the message being within the message validity period, forward the message to the destination device through the connection that meets the preset connection requirement.

15. The method according to claim 14, It is characterized in that The message with a message validity period includes the message sending time and the message validity period, and the determining whether the message is within the message validity period includes: Get the current time; Determine whether the message is within the message validity period according to the message sending time, the message validity period and the current time.

16. The method according to claim 14, It is characterized in that The message with a message validity period includes the message sending time and the message validity period, and the determining whether the message is within the message validity period includes: Acquire the current time and forwarding delay, where the forwarding delay is used to indicate the time required for the forwarding device to forward the message to the destination device; Determine whether the message is within the message validity period according to the current time, the forwarding delay, the message sending time and the message validity period.

17. The method according to claim 14, It is characterized in that The message with a message validity period includes a message validity period, and the determining whether the message is within the message validity period includes: Get the current time; Determine whether the message is within the message validity period according to the current time and the message validity period.

18. The method according to claim 14, It is characterized in that The message with a message validity period includes a message validity period, and the determining whether the message is within the message validity period includes: Acquire the current time and forwarding delay, where the forwarding delay is used to indicate the time required for the forwarding device to forward the message to the destination device; Determine whether the message is within the message validity period according to the current time, the forwarding delay and the message validity period.

19. The method according to claim 14, It is characterized in that The forwarding device includes a high priority transmission queue, and forwarding the message to the destination device includes: The message is forwarded to the destination device through the high priority transmission queue.

20. The method according to claim 14, It is characterized in that The forwarding device includes a first forwarding device based on a first connection medium and a second forwarding device based on a second connection medium, and forwarding the message to the destination device includes: The first forwarding device forwards the message to the destination device through the first connection medium, and the second forwarding device forwards the message to the destination device through the second connection medium.

21. An initiator device, It is characterized in that The method comprises at least one processor and a memory; wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the processor, enable the initiating device to execute the method described in any one of claims 1 to 6.

22. A destination device, It is characterized in that Comprising at least one processor; a memory; wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the processor, enable the destination device to execute the method described in any one of claims 7-13.

23. A forwarding device, It is characterized in that comprising at least one processor; a memory; wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions, which, when executed by the processor, cause the forwarding device to execute the method as described in any one of claims 14-20.

24. A message transmission system, It is characterized in that It includes the initiating end device described in claim 21, the destination end device described in claim 22 and the forwarding device described in claim 23.

25. A computer-readable storage medium, It is characterized in that The method comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 20.

26. A computer program product, It is characterized in that When the computer program product is executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 20.

Citation Information

Patent Citations

  • Method, system and apparatus for transmitting files of P2P network

    CN101304381A

  • Routing method and device

    CN110505600A