Message transmission method and system, electronic device and readable storage medium
By identifying overloaded nodes in the transmission network and generating target transmission paths that can be avoided or have their path reduced, network congestion is solved and message transmission efficiency is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING INSTITUTE OF OPEN SOURCE CHIP
- Filing Date
- 2024-06-07
- Publication Date
- 2026-05-01
AI Technical Summary
In a transmission network, when multiple messages arrive at the same node, it causes network congestion and affects transmission efficiency.
By receiving the first signal, overloaded nodes are identified, and a target transmission path is generated for the message to be transmitted, so that it avoids or minimizes the passage through overloaded nodes, ensuring that the number of overloaded nodes in the target transmission path does not exceed the threshold.
It effectively avoids network congestion, improves message transmission efficiency, and prevents transmission efficiency reduction caused by increased load on overloaded nodes.
Smart Images

Figure CN118474096B_ABST
Abstract
Description
Message transmission methods, systems, electronic devices and readable storage media Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a message transmission method, system, electronic device, and readable storage medium. Background Technology
[0002] With the development of computer technology, information is often transmitted in the network through messages. The network used to transmit information can be composed of multiple nodes. These nodes are interconnected to form a transmission network, and messages can be routed from one node to another to realize message transmission.
[0003] However, in some cases, the transmission network may need to transmit multiple messages simultaneously, and each message may arrive at the same or different nodes. When multiple messages arrive at the same node, it will cause network congestion and seriously affect the efficiency of message transmission in the transmission network. Summary of the Invention
[0004] The purpose of this invention is to provide a message transmission method, system, electronic device, and readable storage medium to achieve the technical objective of ensuring message transmission efficiency. The specific technical solution is as follows:
[0005] In a first aspect of the present invention, a message transmission method is provided, applied to a management terminal included in a message transmission system, wherein the message transmission system further includes a transmission network composed of multiple nodes, comprising:
[0006] Receive a first signal and determine the node that sends the first signal as an overloaded node; the first signal is sent by the node when the number of received messages is not less than a first quantity threshold corresponding to the node;
[0007] In response to a transmission request for a message to be transmitted, a target transmission path is generated for the message to be transmitted in the transmission network, and the message to be transmitted is transmitted according to the target transmission path; the number of overloaded nodes included in the target transmission path is not greater than a target number threshold.
[0008] In a second aspect of the invention, a message transmission method is also provided, applied to any node among a plurality of nodes included in the transmission network of a message transmission system, wherein the message transmission system further includes a management terminal, and the method includes:
[0009] Upon receiving a message, the preset counter is incremented by 1; and after sending any message, the preset counter is decremented by 1.
[0010] If the current count value of the preset counter is not less than the first quantity threshold corresponding to the node, a first signal is sent to the management terminal.
[0011] The management terminal is used to receive a first signal and identify the node that sends the first signal as an overloaded node; in response to the transmission request of the message to be transmitted, it generates a target transmission path for the message to be transmitted in the transmission network and causes the message to be transmitted to be transmitted to be transmitted according to the target transmission path; the number of overloaded nodes included in the target transmission path is not greater than a target number threshold.
[0012] In a third aspect of the present invention, a message transmission system is also provided, the system including a transmission network and a management terminal, wherein the transmission network is composed of multiple nodes;
[0013] The management terminal is configured to: receive a first signal and identify the node that sends the first signal as an overloaded node; in response to a transmission request of a message to be transmitted, generate a target transmission path for the message to be transmitted in the transmission network, and cause the message to be transmitted to be transmitted according to the target transmission path; the number of overloaded nodes included in the target transmission path is not greater than a target number threshold.
[0014] Any of the nodes is configured to: increment a preset counter by 1 upon receiving a message, and decrement the preset counter by 1 after sending any message; and send a first signal to the management terminal if the current count value of the preset counter is not less than a first quantity threshold corresponding to the node.
[0015] In a fourth aspect of the present invention, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.
[0016] Memory, used to store computer programs;
[0017] A processor, when executing a program stored in memory, implements the method described in the first or second aspect above.
[0018] In a fifth aspect of the invention, a computer-readable storage medium is also provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the method described in the first or second aspect above.
[0019] In a sixth aspect of the invention, a computer program product comprising instructions is also provided, which, when run on a computer, causes the computer to perform the method described in the first or second aspect above.
[0020] The message transmission method provided in this embodiment of the invention receives a first signal and identifies the node sending the first signal as an overloaded node. The first signal is sent by the node when the number of received messages is not less than a first quantity threshold corresponding to the node. In response to a transmission request of a message to be transmitted, a target transmission path is generated for the message to be transmitted in the transmission network, and the message to be transmitted is transmitted according to the target transmission path. The number of overloaded nodes included in the target transmission path is not greater than the target quantity threshold. In this embodiment of the invention, by receiving the first signal, overloaded nodes with a message count not less than the first quantity threshold corresponding to the node can be identified, thereby enabling monitoring of node load and timely identification of nodes with high load. Based on this, by generating a target transmission path for the message to be transmitted with a number of overloaded nodes not greater than the target quantity threshold, the message to be transmitted can pass through fewer overloaded nodes during transmission to a certain extent, avoiding further increase in the load of overloaded nodes. At the same time, since the message to be transmitted passes through fewer overloaded nodes during transmission, the transmission efficiency of the message to be transmitted can be guaranteed, avoiding the problem of low message transmission efficiency caused by network congestion. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0022] Figure 1 is a flowchart of a message transmission method according to an embodiment of the present invention;
[0023] Figure 2 is a schematic diagram of a mesh network provided in an embodiment of the present invention;
[0024] Figure 3 is a schematic diagram of a message transmission system according to an embodiment of the present invention;
[0025] Figure 4 is a schematic diagram of another message transmission system in an embodiment of the present invention;
[0026] Figure 5 is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0027] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.
[0028] Figure 1 is a flowchart of a message transmission method according to an embodiment of the present invention. The method is applied to a management terminal included in a message transmission system, which also includes a transmission network composed of multiple nodes. As shown in Figure 1, the method includes:
[0029] Step 101: Receive the first signal and determine the node that sends the first signal as an overloaded node; the first signal is sent by the node when the number of received messages is not less than the first quantity threshold corresponding to the node.
[0030] Step 102: In response to the transmission request of the message to be transmitted, a target transmission path is generated for the message to be transmitted in the transmission network, and the message to be transmitted is transmitted according to the target transmission path; the number of overloaded nodes included in the target transmission path is not greater than the target number threshold.
[0031] This invention can be applied to fields requiring message transmission, such as vehicles, industrial control, and medical devices. The management terminal can be a computer system composed of software and hardware. The transmission network refers to a network structure used for message transmission, consisting of multiple nodes. Each node is a connection point in the transmission network; it can be a computing device, sensor, or other communication device. They are interconnected via protocols to form the transmission network. A node in the transmission network can receive messages and, through the interconnection of nodes, be routed to another node. A message refers to a data packet transmitted from a source address to a destination address, containing the source address, destination address, and payload for transmitting information. Each node in the transmission network can act as a router, sending and receiving messages and maintaining connections and communication with one or more other nodes.
[0032] Specifically, the aforementioned management terminal can communicate with multiple nodes included in the transmission network, receive a first signal, and identify the node sending the first signal as an overloaded node. The first signal is sent by a node when the number of received packets is not less than a first quantity threshold corresponding to that node. Specifically, the first quantity threshold is preset based on the processing performance of each node and represents the upper limit of the number of packets a node can process simultaneously. The first quantity thresholds for different nodes can be the same or different, and can be set according to the performance of each node in the transmission network; this embodiment of the invention does not impose such limitations.
[0033] Specifically, for any given node, the node can count the number of received packets. When the count reaches a first threshold for that node, the node sends a first signal to the management terminal. Specifically, a preset counter can be set for each node. For each received packet, the preset counter increments by 1; conversely, for each sent packet, the preset counter decrements by 1. The count value of the preset counter allows real-time monitoring of the number of packets being processed by the node. The first signal can be 0 or 1, or any other string format; this embodiment of the invention does not impose any limitations on this. Furthermore, the first signal can also carry an identifier of the node sending the first signal. Therefore, in this embodiment of the invention, the management terminal can identify the node sending the first signal through the node identifier in the first signal and determine the node sending the first signal as an overloaded node.
[0034] Furthermore, the node that sends the first signal is often a node with a large load. Based on this, embodiments of the present invention can generate a target transmission path for the message to be transmitted based on the address information of the overloaded node.
[0035] The aforementioned transmission request can be initiated by the message sender. The transmission request may carry the message to be transmitted, the source address of the message to be transmitted, and the destination address of the message to be transmitted. The source address represents the address information of the originating node, and the destination address represents the address information of the destination node of the message to be transmitted. That is, the message to be transmitted needs to be routed from the originating node to the destination node, and the target transmission path refers to the transmission path formed by the nodes traversed from the originating node to the destination node.
[0036] The address information mentioned above refers to the coordinates of a node in the transmission network, which is related to the connection method of each node in the transmission network. Taking a mesh network as an example, the nodes in a mesh network are connected in a grid pattern, so the address information of a node in a mesh network refers to the horizontal and vertical coordinates of the node in the mesh network.
[0037] Furthermore, embodiments of the present invention can generate a target transmission path for the message to be transmitted in the transmission network based on the address information of the overloaded nodes, so that the message to be transmitted is transmitted according to the target transmission path. Specifically, embodiments of the present invention can generate a target transmission path that does not pass through overloaded nodes based on the coordinates of the starting node and the destination node of the message to be transmitted in the transmission network, or a target transmission path that passes through fewer overloaded nodes can be generated. This can be set according to actual needs, and embodiments of the present invention do not impose any restrictions on this. Furthermore, the above-mentioned target number threshold refers to the maximum value of overloaded nodes that can be included in the target transmission path without affecting transmission efficiency or increasing the load on overloaded nodes. This can be preset according to the number of nodes included in the transmission network. In one case, when the number of nodes included in the transmission network is large, the above-mentioned target number threshold can be 0, thereby ensuring that the message to be transmitted does not need to pass through overloaded nodes during transmission, minimizing the increase in the load on overloaded nodes. In another scenario, when the number of nodes in the transmission network is small, the target number threshold can be a small non-zero value such as 5, 4, or 7 to avoid the problem of excessively long target transmission paths due to bypassing overloaded nodes, thus ensuring the transmission efficiency of the message to be transmitted.
[0038] In summary, the message transmission method provided in this embodiment of the invention receives a first signal and identifies the node sending the first signal as an overloaded node. The first signal is sent by the node when the number of received messages is not less than a first quantity threshold corresponding to the node. In response to a transmission request for a message to be transmitted, a target transmission path is generated for the message to be transmitted in the transmission network, and the message to be transmitted is transmitted according to the target transmission path. The number of overloaded nodes included in the target transmission path is not greater than the target quantity threshold. In this embodiment of the invention, by receiving the first signal, overloaded nodes with a message count not less than the first quantity threshold corresponding to the node can be identified, thereby enabling monitoring of node load and timely identification of nodes with high load. Based on this, by generating a target transmission path for the message to be transmitted with a number of overloaded nodes not greater than the target quantity threshold, the message to be transmitted can pass through fewer overloaded nodes during transmission to a certain extent, avoiding further increase in the load of overloaded nodes. At the same time, since the message to be transmitted passes through fewer overloaded nodes during transmission, the transmission efficiency of the message to be transmitted can be guaranteed, avoiding the problem of low message transmission efficiency caused by network congestion.
[0039] Optionally, after determining the node sending the first signal as an overloaded node in the above steps, the embodiments of the present invention may further include:
[0040] S21. Obtain the number of overloaded nodes as the overload quantity.
[0041] S22. If the overload quantity is not less than the second quantity threshold, perform the operation of generating a target transmission path for the message to be transmitted in the transmission network.
[0042] The aforementioned overload quantity is used to characterize the number of overloaded nodes currently existing in the transmission network. Specifically, a counter can be set at the management end. When a first signal is received, the counter is incremented by 1, thereby allowing the number of overloaded nodes to be obtained in real time by reading the counter value. Optionally, the management end in this embodiment of the invention may also include a display component. Each time the management end receives a first signal, it can also display the status of the overloaded node corresponding to the first signal through the display component: busy state or high load state.
[0043] The second quantity threshold can be preset and can be set according to the total number of nodes included in the transmission network. For example, the second quantity threshold can be set to 50%, 60%, 75%, or 65% of the total number of nodes, etc. The specific threshold can be set according to actual needs.
[0044] Furthermore, if the number of overloaded nodes is not less than the second threshold, it indicates that there are many nodes with large loads and the entire transmission network is under heavy load. At this time, the operation of generating a target transmission path for the message to be transmitted can be performed so that the message to be transmitted passes through fewer overloaded nodes during transmission, thus avoiding further increasing the load on the overloaded nodes.
[0045] Optionally, if the number of overloaded nodes is less than the second threshold mentioned above, it indicates that the number of nodes with high load is relatively small, and the overall load on the transmission network is low. In this case, it is not necessary to perform the operation in step 102 above, and there is no restriction on the nodes that the message to be transmitted passes through during transmission. The preset routing processor (router) can directly route the message to be transmitted based on the originating node and the destination node. The router is responsible for determining the transmission path based on network conditions and the destination of the data packet, and forwarding the data packet to the target interface. Routing refers to the process of directing data packets according to their destination and forwarding them to another interface. Routing determines the optimal transmission path for data in the network, ensuring that data reaches its destination efficiently and accurately.
[0046] In this embodiment of the invention, the number of overloaded nodes is obtained as the overload quantity; if the overload quantity is not less than a second quantity threshold, the operation of generating a target transmission path for the message to be transmitted in the transmission network is performed. Thus, the operation of generating a target transmission path for the message to be transmitted in the transmission network is only performed when the number of overloaded nodes is not less than the second quantity threshold. This ensures that the number of overloaded nodes included in the transmission path of the message to be transmitted is limited only when the load on the entire transmission network is high, thereby avoiding unnecessary path generation judgment operations to some extent.
[0047] Optionally, after determining the node sending the first signal as an overloaded node, the embodiments of the present invention may further include the following steps:
[0048] S31. Based on the number of messages received by each node, generate load parameters for each node.
[0049] In step 102 above, the operation of generating a target transmission path for the message to be transmitted in the transmission network in response to a transmission request can specifically include, in this embodiment of the invention:
[0050] S32. In response to the transmission request of the message to be transmitted, a target transmission path is generated for the message to be transmitted in the transmission network based on the load parameters of each node.
[0051] The aforementioned load parameters characterize the current load status of a node. Specifically, load parameters can include high, medium, and low. In particular, embodiments of the present invention can pre-set different parameter thresholds for different load parameters. When the number of packets received by any node reaches the parameter threshold of a certain load parameter, corresponding load parameters can be generated for that node.
[0052] Furthermore, embodiments of the present invention can generate target transmission paths for packets to be transmitted in the transmission network based on the load parameters of each node. Specifically, since overloaded nodes often receive a large number of packets, their load parameters are often not low, i.e., medium or high. Based on this, embodiments of the present invention can generate target transmission paths in the transmission network where all nodes in the path have non-low load parameters. Alternatively, the number of nodes in the target transmission path with high or medium load parameters can be no greater than the aforementioned target number threshold.
[0053] In this embodiment of the invention, load parameters are generated for each node based on the number of packets received by each node; in response to a transmission request for a packet to be transmitted, a target transmission path is generated for the packet to be transmitted in the transmission network based on the load parameters of each node. In this way, a target transmission path can be generated for the packet to be transmitted according to the load parameters, ensuring the effectiveness of the target transmission path generation.
[0054] Optionally, the operation of generating a target transmission path for the message to be transmitted in the transmission network based on the load parameters of each node may specifically include the following steps in this embodiment of the invention:
[0055] S41. Obtain the starting node and destination node of the message to be transmitted.
[0056] S42. Using the starting node as the node to be determined, based on the address information of the node to be determined, obtain the nodes in the transmission network that are adjacent to the node to be determined in the target direction, and use them as candidate nodes.
[0057] S43. If the load parameters of the candidate node meet the preset conditions, the candidate node is taken as a new candidate node, and the operation of obtaining the node adjacent to the candidate node in the target direction in the transmission network based on the address information of the candidate node is re-executed, until the current candidate node is the destination node.
[0058] Here, the aforementioned starting node refers to the node that receives the message to be transmitted from the message sender. The message sender can directly send the message to be transmitted to the starting node through the interface. Correspondingly, the aforementioned destination node refers to the node corresponding to the destination address of the message to be transmitted. The node identifiers or address information of both the starting and destination nodes can be included in the message to be transmitted or the transmission request for the message to be transmitted. Therefore, step S41 can obtain the starting node and destination node by acquiring the node identifiers or address information from the message to be transmitted or the transmission request.
[0059] Here, the target direction refers to the direction closer to the destination node. For example, taking a ring network, the target direction refers to the direction from the node to be determined towards the destination node on the ring network, typically upwards or downwards. Furthermore, the candidate node refers to a node in the transmission network that is adjacent to the node to be determined in the target direction.
[0060] Specifically, the address information of each node in the transmission network can be predetermined. Thus, in this embodiment of the invention, the node whose address information is in the target direction and is adjacent to the node to be determined can be selected as the candidate node based on the address information of the node to be determined in the transmission network.
[0061] The aforementioned preset conditions can be that the load parameter is a specified load parameter, or that the load parameter is not lower than a specified load parameter threshold. These conditions can be set according to actual needs, and this embodiment of the invention does not impose any limitations on them. For example, taking load parameters including high, medium, and low as an example, the aforementioned preset conditions can be that the load parameter is low, and / or medium, or that the aforementioned preset conditions can be that the load parameter is not high.
[0062] Furthermore, if the load parameters of the candidate node meet the preset conditions, the candidate node is taken as a new candidate node, and the above operation of obtaining the node adjacent to the candidate node in the target direction in the transmission network based on the address information of the candidate node is re-executed, until the current candidate node is the destination node.
[0063] In this embodiment of the invention, the above operations can ensure that the load parameters of the nodes included in the target transmission path meet the preset conditions, thereby ensuring the transmission efficiency of the message to be transmitted.
[0064] Optionally, the above-mentioned message transmission system further includes a core terminal, which is used to send messages to the transmission network; the embodiments of the present invention may further include the following steps:
[0065] S51. If the load parameters of the candidate node do not meet the preset conditions, an interrupt signal is sent to the core terminal; the core terminal is used to perform a preset processing operation based on the interrupt signal and stop sending messages to the transmission network.
[0066] The aforementioned core endpoint refers to the endpoint used to send messages to the transmission network, and can be a processor core. Furthermore, this embodiment of the invention may include one core endpoint or multiple core endpoints, which can be configured according to actual conditions; this embodiment of the invention does not impose any limitations on this. Furthermore, when multiple cores are sending messages to the transmission network simultaneously, network congestion is more likely to occur due to the simultaneous operation and transmission of messages by multiple cores.
[0067] Furthermore, if the load parameters of the candidate node do not meet the above-mentioned preset conditions, it indicates that the load of the nodes in the target direction of the node to be determined is relatively large. At this time, it is impossible to generate a target transmission path that meets the requirements. That is, during the process of the starting node moving to the destination node, it is impossible to avoid the nodes with large loads. The transmission efficiency of the message to be transmitted will definitely be affected by network congestion. Based on this, the embodiment of the present invention can send an interrupt signal to the core end at this time. When the core end receives the interrupt signal, it performs a preset processing operation and stops sending messages to the transmission network.
[0068] Here, an interrupt refers to an event triggered by hardware or software to respond to urgent tasks or abnormal situations. It can cause the processor to suspend its current execution and instead handle interrupt service routines (ISRs). Furthermore, the aforementioned preset processing operations refer to the ISRs pre-set by the kernel. The ISRs can be set according to the actual situation of the kernel, and this embodiment of the invention does not impose any restrictions on this.
[0069] Specifically, in this embodiment of the invention, the interrupt signal refers to a signal used to trigger an interrupt event. Furthermore, the interrupt signal may also include the node identifier of the candidate node or the node identifier of the starting node of the message to be transmitted, thereby facilitating the core end to record the node that triggered the interrupt based on the node identifier and save the context at the time of the interrupt.
[0070] Optionally, embodiments of the present invention can also update the load parameters of each node in real time. After the updated load parameters of the candidate node meet the preset conditions, the site is restored and the message sending and receiving work continues.
[0071] In this embodiment of the invention, if the load parameters of the candidate node do not meet the preset conditions, an interrupt signal is sent to the core terminal. The core terminal is used to perform preset processing operations based on the interrupt signal and stop sending packets to the transmission network. In this way, an interrupt handling mechanism is used to cope with network congestion, avoiding system crashes or freezes caused by continuing to transmit packets under severe network congestion, thus improving the stability of the transmission network and the packet transmission system.
[0072] Optionally, the aforementioned transmission network is a mesh structure, and the address information of any node includes both abscissa and ordinate; the operation of obtaining nodes adjacent to the node to be determined in the target direction in the transmission network based on the address information of the node to be determined, as candidate nodes, may specifically include the following in this embodiment of the invention:
[0073] S61. If the x-coordinate of the node to be determined is greater than the x-coordinate of the destination node, obtain the node in the transmission network that is to the left of the node to be determined and adjacent to the node to be determined, and use it as a candidate node.
[0074] And / or, S62, if the ordinate of the node to be determined is greater than the ordinate of the destination node, obtain a node in the transmission network that is below the node to be determined and adjacent to the node to be determined, as a candidate node.
[0075] The aforementioned mesh structure refers to a transmission network where nodes are interconnected in a grid-like pattern; in this case, the transmission network is a mesh network. A mesh network is a multi-node, decentralized, self-organizing wireless multi-hop communication network. In such a network, any wireless device node can act as a router, sending and receiving signals, and dynamically maintaining connections and communication with other single or multiple nodes.
[0076] Furthermore, in a mesh network, since the nodes are connected in a grid pattern, the address information of each node in the mesh network often includes both horizontal and vertical coordinates. For example, Figure 2 is a schematic diagram of a mesh network structure provided by an embodiment of the present invention. As shown in Figure 2, the address information of each node in the mesh network is represented by coordinates in the x and y directions, and the address information of the node located at the origin of the coordinate system is (x0, y0).
[0077] Furthermore, if the destination node is to the left of the node to be determined (i.e., the x-coordinate of the destination node is less than the x-coordinate of the node to be determined), then check whether the load parameters of the left-adjacent node of the node to be determined meet the preset conditions (e.g., whether the load parameters are not low). If so, move to the left, that is, determine the left-adjacent node as the new node to be determined. If the destination node is to the right of the node to be determined (i.e., the x-coordinate of the destination node is greater than the x-coordinate of the node to be determined), then check whether the load parameters of the right-adjacent node of the node to be determined meet the preset conditions (e.g., whether the load parameters are not low). If so, move to the right, that is, determine the right-adjacent node as the new node to be determined. If the adjacent node to which the x-axis needs to be moved is still congested, then the y-axis is checked: If the destination node is below the node to be determined (i.e., the y-coordinate of the destination node is less than the y-coordinate of the node to be determined), then the adjacent nodes below the node to be determined are checked for congestion. Specifically, the load parameters of these adjacent nodes are checked to see if they meet preset conditions (e.g., whether the load parameters are not low). If not, the node is moved downwards, and the adjacent node below is identified as the new node to be determined. If the destination node is above the node to be determined (i.e., the y-coordinate of the destination node is greater than the y-coordinate of the node to be determined), then the nodes above are checked for congestion. Specifically, the load parameters of these adjacent nodes above the node to be determined are checked to see if they meet preset conditions (e.g., whether the load parameters are not low). If not, the node is moved upwards, and the adjacent node above is identified as the new node to be determined.
[0078] Optionally, if the x-coordinate of the node to be determined is the same as the x-coordinate of the target node, the node to be selected can be determined directly along the y-axis. Similarly, if the y-coordinate of the node to be determined is the same as the y-coordinate of the target node, the node to be selected can be determined directly along the x-axis.
[0079] Furthermore, if nodes in both the x and y directions are congested, the generation of target transmission paths for the messages to be transmitted will be stopped, and routing will continue once the congestion is alleviated.
[0080] In this embodiment of the invention, when the transmission network is a mesh structure, the address information of any node includes an x-coordinate and a y-coordinate. If the x-coordinate of the node to be determined is greater than the x-coordinate of the destination node, a node in the transmission network to the left of the node to be determined and adjacent to it is selected as a candidate node; and / or, if the y-coordinate of the node to be determined is greater than the y-coordinate of the destination node, a node in the transmission network below the node to be determined and adjacent to it is selected as a candidate node. Thus, for a mesh-structured transmission network, a suitable target transmission path can be quickly generated by determining either the x-coordinate or y-coordinate.
[0081] Optionally, embodiments of the present invention also provide a message transmission method, which is applied to any node among multiple nodes included in the transmission network of a message transmission system. The message transmission system further includes a management terminal, and embodiments of the present invention may specifically include:
[0082] Upon receiving a message, the preset counter is incremented by 1, and upon sending any message, the preset counter is decremented by 1.
[0083] If the current count value of the preset counter is not less than the first quantity threshold corresponding to the node, a first signal is sent to the management terminal.
[0084] The management terminal is used to receive a first signal and identify the node that sends the first signal as an overloaded node; in response to the transmission request of the message to be transmitted, it generates a target transmission path for the message to be transmitted in the transmission network and causes the message to be transmitted to be transmitted to be transmitted according to the target transmission path; the number of overloaded nodes included in the target transmission path is not greater than a target number threshold.
[0085] A counter can be pre-set on each node as a preset counter, also known as a message counter. Whenever a node receives a message, the message counter's count is incremented by 1; whenever a message is sent, the count is decremented by 1. Accordingly, the current busy status of the node can be determined by the count value of this preset counter.
[0086] The first quantity threshold mentioned above can be determined based on the performance of the node itself. Different nodes may have different first quantity thresholds, and some nodes may have the same first quantity threshold. This embodiment of the invention does not limit this.
[0087] Furthermore, if the current count value of the preset counter is not less than the first quantity threshold corresponding to the node, it indicates that the node is under heavy load and can send the first signal to the management terminal.
[0088] Furthermore, the management terminal is used to receive the first signal and identify the node that sends the first signal as an overloaded node. In response to the transmission request of the message to be transmitted, it generates a target transmission path for the message to be transmitted in the transmission network and enables the message to be transmitted to be transmitted according to the target transmission path. The number of overloaded nodes included in the target transmission path is not greater than the target number threshold.
[0089] In summary, the message transmission method provided by this invention increments a preset counter by 1 upon receiving a message and decrements the preset counter by 1 after sending any message. When the current count value of the preset counter is not less than a first quantity threshold corresponding to the node, a first signal is sent to the management terminal. The management terminal receives the first signal and identifies the node sending the first signal as an overloaded node. In response to a transmission request for a message to be transmitted, a target transmission path is generated for the message to be transmitted in the transmission network, and the message to be transmitted is transmitted according to the target transmission path. The number of overloaded nodes included in the target transmission path is not greater than the target quantity threshold. In this invention, by incrementing the preset counter by 1 upon receiving a message and decrementing it by 1 after sending any message, the busy status of nodes can be monitored in real time using the preset counter. By sending a first signal when the current count value is not less than the first quantity threshold, the busy status of nodes can be fed back to the management terminal. Upon receiving the first signal, the management terminal can identify overloaded nodes whose packet count is not less than a first threshold value, thereby enabling monitoring of node load and timely identification of nodes with high loads. Based on this, by generating a target transmission path for the packets to be transmitted, containing no more than the target threshold number of overloaded nodes, the transmission path can be made to pass through fewer overloaded nodes during transmission, avoiding further increases in the load on overloaded nodes. Simultaneously, because the transmission path passes through fewer overloaded nodes, the transmission efficiency of the packets can be guaranteed, avoiding the problem of low packet transmission efficiency caused by network congestion.
[0090] Figure 3 is a schematic diagram of a message transmission system according to an embodiment of the present invention. As shown in Figure 3, the system may include a transmission network 201 and a management terminal 202. The transmission network is composed of multiple nodes 2011.
[0091] The management terminal 202 is configured to: receive a first signal and identify the node that sends the first signal as an overloaded node; in response to a transmission request of a message to be transmitted, generate a target transmission path for the message to be transmitted in the transmission network, and cause the message to be transmitted to be transmitted according to the target transmission path; the number of overloaded nodes included in the target transmission path is not greater than a target number threshold.
[0092] Any of the nodes 2011 is configured to: increment a preset counter by 1 upon receiving a message, and decrement the preset counter by 1 after sending any message; and send a first signal to the management terminal if the current count value of the preset counter is not less than a first quantity threshold corresponding to the node.
[0093] Optionally, after determining that the node sending the first signal is an overloaded node, the management terminal is further configured to:
[0094] Obtain the number of overloaded nodes as the overload quantity;
[0095] If the number of overloads is not less than the second threshold, the operation of generating a target transmission path for the message to be transmitted in the transmission network is performed.
[0096] Optionally, the management terminal is further configured to: generate load parameters for each node based on the number of messages received by each node;
[0097] The management terminal is specifically used to: in response to a transmission request of a message to be transmitted, generate a target transmission path for the message to be transmitted in the transmission network based on the load parameters of each node.
[0098] Optionally, the management terminal is specifically used for:
[0099] Obtain the start node and destination node of the message to be transmitted;
[0100] The starting node is taken as the node to be determined. Based on the address information of the node to be determined, the nodes in the transmission network that are adjacent to the node to be determined in the target direction are obtained as candidate nodes.
[0101] If the load parameters of the candidate node meet the preset conditions, the candidate node is selected as a new candidate node, and the operation of obtaining the node adjacent to the candidate node in the target direction in the transmission network based on the address information of the candidate node is re-executed, until the current candidate node is the destination node.
[0102] Optionally, the transmission network is a mesh structure, and the address information of any node includes a horizontal coordinate and a vertical coordinate; the management terminal is specifically used for:
[0103] If the x-coordinate of the node to be determined is greater than the x-coordinate of the destination node, obtain the node in the transmission network that is to the left of the node to be determined and adjacent to the node to be determined, and use it as a candidate node.
[0104] And / or, if the ordinate of the node to be determined is greater than the ordinate of the destination node, obtain the node in the transmission network that is below the node to be determined and adjacent to the node to be determined, as the candidate node.
[0105] Optionally, the message transmission system further includes a core terminal, which is used to send messages to the transmission network; the management terminal is further used for:
[0106] If the load parameters of the candidate node do not meet the preset conditions, an interrupt signal is sent to the core terminal.
[0107] The core terminal is used to perform preset processing operations based on the interrupt signal and stop sending messages to the transmission network.
[0108] Furthermore, Figure 4 is a schematic diagram of another message transmission system in an embodiment of the present invention. As shown in Figure 4, it includes node traffic monitoring, upper-layer software, core, and mesh network.
[0109] A packet counter is set up on each node to monitor the nodes in the transmission network. When a packet arrives at the node, the counter value is incremented by 1; when a packet is sent, the counter value is decremented by 1. This counter records the number of packets being processed by the node in real time, and the congestion level of the node is determined based on the number of packets.
[0110] In this system, the upper-layer software and node traffic monitoring constitute the management terminal of the packet transmission system. The node traffic monitoring can be configured with a counter to count the number of overloaded nodes. When the number of overloaded nodes reaches a second threshold, an interrupt signal is sent to the upper-layer software, causing the software to generate a target transmission path for the packets to be transmitted based on the overloaded nodes. Furthermore, if a satisfactory target transmission path cannot be generated, the upper-layer software sends an interrupt signal to the core, causing the core to save its current state and execute an interrupt handler. In this way, by receiving and processing interrupts at the software system layer, and by implementing packet routing and monitoring feedback in the hardware process, the goal of software and hardware collaboratively optimizing routing congestion and improving overall processing efficiency is achieved.
[0111] Optionally, embodiments of the present invention can also accelerate the generation of the target transmission path through a hardware accelerator.
[0112] In summary, the message transmission system provided in this embodiment of the invention includes a transmission network and a management terminal. The transmission network consists of multiple nodes. The management terminal is configured to: receive a first signal and identify the node sending the first signal as an overloaded node; in response to a transmission request for a message to be transmitted, generate a target transmission path for the message to be transmitted in the transmission network, and transmit the message according to the target transmission path; the number of overloaded nodes included in the target transmission path is not greater than a target number threshold; any node is configured to: increment a preset counter by 1 when a message is received, and decrement the preset counter by 1 after sending any message; and send a first signal to the management terminal when the current count value of the preset counter is not less than a first number threshold corresponding to the node. In this embodiment of the invention, by incrementing the preset counter by 1 when a message is received and decrementing the preset counter by 1 when a message is sent, the busy status of the node can be monitored in real time using the preset counter. By sending a first signal when the current count value is not less than the first number threshold, the busy status of the node can be fed back to the management terminal. Upon receiving the first signal, the management terminal can identify overloaded nodes whose packet count is not less than a first threshold value, thereby enabling monitoring of node load and timely identification of nodes with high loads. Based on this, by generating a target transmission path for the packets to be transmitted, containing no more than the target threshold number of overloaded nodes, the transmission path can be made to pass through fewer overloaded nodes during transmission, avoiding further increases in the load on overloaded nodes. Simultaneously, because the transmission path passes through fewer overloaded nodes, the transmission efficiency of the packets can be guaranteed, avoiding the problem of low packet transmission efficiency caused by network congestion.
[0113] This invention also provides an electronic device, as shown in FIG5, including a processor 9001, a communication interface 9002, a memory 9003, and a communication bus 9004, wherein the processor 9001, the communication interface 9002, and the memory 9003 communicate with each other through the communication bus 9004.
[0114] The 9003 memory is used to store computer programs;
[0115] The processor 9001 is used to implement the above-mentioned message transmission method when executing the program stored in the memory 9003.
[0116] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0117] The communication interface is used for communication between the aforementioned terminal and other devices.
[0118] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0119] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0120] In another embodiment of the present invention, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform any of the message transmission methods described in the above embodiments.
[0121] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the message transmission methods described in the above embodiments.
[0122] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0123] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0124] It should be noted that the various data-related processes in the embodiments of this application are carried out in compliance with the relevant data protection laws and policies of the country where the location is located, and with the authorization granted by the owner of the corresponding device.
[0125] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0126] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A message transmission method, characterized in that, The method is applied to a management terminal included in a message transmission system, which further includes a transmission network composed of multiple nodes in a mesh structure. The method includes: receiving a first signal and identifying the node sending the first signal as an overloaded node; generating load parameters for each node based on the number of messages received by each node; the first signal is sent by a node when the number of messages received is not less than a first quantity threshold corresponding to the node; obtaining the number of overloaded nodes as an overload quantity; and, if the overload quantity is not less than a second quantity threshold, performing the operation of generating a target transmission path for the message to be transmitted in the transmission network; and, in response to a transmission request for the message to be transmitted, generating a target transmission path for the message to be transmitted in the transmission network based on the load parameters of each node, including: obtaining the target transmission path for the message to be transmitted... The process involves identifying the starting and destination nodes of a data transmission message; using the starting node as a node to be determined, and based on the address information of the node to be determined, obtaining nodes in the transmission network adjacent to the node to be determined in the target direction as candidate nodes; if the load parameters of the candidate nodes meet preset conditions, designating the candidate nodes as new nodes to be determined, and re-executing the operation of obtaining nodes in the transmission network adjacent to the node to be determined in the target direction based on the address information of the node to be determined, until the current candidate node is the destination node; and ensuring that the data transmission message is transmitted according to the target transmission path; the number of overloaded nodes included in the target transmission path is not greater than a target number threshold, where the target number threshold is a positive integer greater than 1; wherein, the address information of any node includes an abscissa and a ordinate.
2. The method according to claim 1, characterized in that, The step of obtaining, based on the address information of the node to be determined, nodes in the transmission network adjacent to the node to be determined in the target direction as candidate nodes includes: when the x-coordinate of the node to be determined is greater than the x-coordinate of the destination node, obtaining nodes in the transmission network to the left of the node to be determined and adjacent to the node to be determined as candidate nodes; and / or, when the y-coordinate of the node to be determined is greater than the y-coordinate of the destination node, obtaining nodes in the transmission network below the node to be determined and adjacent to the node to be determined as candidate nodes.
3. The method according to claim 1, characterized in that, The message transmission system further includes a core terminal, which is used to send messages to the transmission network; the method further includes: sending an interrupt signal to the core terminal when the load parameters of the candidate node do not meet the preset conditions; the core terminal is used to perform a preset processing operation based on the interrupt signal and stop sending messages to the transmission network.
4. A message transmission method, characterized in that, The method is applied to any node among multiple nodes in a transmission network of a message transmission system, wherein the transmission network is a mesh structure and the message transmission system further includes a management terminal. The method includes: incrementing a preset counter by 1 upon receiving a message, and decrementing the preset counter by 1 after sending any message; sending a first signal to the management terminal if the current count value of the preset counter is not less than a first quantity threshold corresponding to the node; the management terminal receiving the first signal and identifying the node sending the first signal as an overloaded node; generating load parameters for each node based on the number of messages received by each node; obtaining the number of overloaded nodes as an overload quantity; performing the operation of generating a target transmission path for the message to be transmitted in the transmission network if the overload quantity is not less than a second quantity threshold; and, in response to a transmission request for the message to be transmitted, decrementing the target transmission path in the transmission network based on the load parameters of each node. In the transmission network, a target transmission path is generated for the message to be transmitted, including: obtaining the starting node and the destination node of the message to be transmitted; using the starting node as the node to be determined, and based on the address information of the node to be determined, obtaining the nodes in the transmission network adjacent to the node to be determined in the target direction as candidate nodes; if the load parameters of the candidate nodes meet the preset conditions, using the candidate nodes as new nodes to be determined, and re-executing the operation of obtaining the nodes in the transmission network adjacent to the node to be determined in the target direction based on the address information of the node to be determined, until the current candidate node is the destination node; and causing the message to be transmitted to be transmitted according to the target transmission path; the number of overloaded nodes included in the target transmission path is not greater than a target number threshold, and the target number threshold is a positive integer greater than 1; wherein, the address information of any node includes an abscissa and a ordinate.
5. A message transmission system, characterized in that, The system includes a transmission network and a management terminal. The transmission network consists of multiple nodes and has a mesh structure. The management terminal is used to: receive a first signal and identify the node that sends the first signal as an overloaded node; generate load parameters for each node based on the number of messages received by each node; and obtain the number of overloaded nodes as the overload quantity. If the number of overloads is not less than the second threshold, the operation of generating a target transmission path for the message to be transmitted in the transmission network is performed. In response to a transmission request for a message to be transmitted, a target transmission path is generated for the message in the transmission network based on the load parameters of each node. This includes: obtaining the starting node and the destination node of the message to be transmitted; using the starting node as a node to be determined, and based on the address information of the node to be determined, obtaining nodes in the transmission network adjacent to the node to be determined in the target direction as candidate nodes; if the load parameters of the candidate nodes meet preset conditions, using the candidate nodes as new nodes to be determined, and re-executing the step of obtaining nodes in the transmission network adjacent to the node to be determined in the target direction based on the address information of the node to be determined. The operation of a node as a candidate node continues until the current candidate node is the destination node; and the message to be transmitted is transmitted according to the target transmission path; the number of overloaded nodes included in the target transmission path is not greater than a target number threshold, the target number threshold being a positive integer greater than 1; any node is configured to: increment a preset counter by 1 upon receiving a message, and decrement the preset counter by 1 after sending any message; and send a first signal to the management terminal if the current count value of the preset counter is not less than the first number threshold corresponding to the node; wherein the address information of any node includes an abscissa and a ordinate.
6. An electronic device, characterized in that, The system includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor, when executing the program stored in the memory, implements the method described in any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-4.
Citation Information
Patent Citations
Packet routing method, system, device and method, system for selecting backup resource
CN101399746A
Path planning method and device, path planning equipment and storage medium
CN111865799A
Data processing method and device, electronic equipment and storage medium
CN113791902A