Message transmission method and apparatus, electronic device, computer-readable storage medium, and product

WO2026200236A1PCT designated stage Publication Date: 2026-10-01INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/073766
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-03-28
Filing Date
2026-01-20
Publication Date
2026-10-01

Smart Images

  • Figure CN2026073766_01102026_PF_FP_ABST
    Figure CN2026073766_01102026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of communications, and discloses a message transmission method and apparatus, an electronic device, a computer-readable storage medium, and a product. Message transmission is performed by means of a reused channel, thereby eliminating the need to allocate, from a channel pool, a channel to a message to be transmitted, and thus avoiding message transmission latency caused by channel allocation. Therefore, the problem of high message transmission latency can be solved, thereby achieving the technical effect of improving message transmission efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Message transmission methods, apparatus, electronic devices, computer-readable storage media and products

[0001] Cross-reference to related applications

[0002] This application claims priority to Chinese Patent Application No. 202510378037.6, filed on March 28, 2025, entitled “Message Transmission Method, Apparatus, Electronic Device, Medium and Product”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of communication technology, and to a message transmission method, apparatus, electronic device, computer-readable storage medium, and product. Background Technology

[0004] In distributed storage systems, the message transmission mechanism between cluster nodes is the core foundation for ensuring data consistency and system performance. With the rapid growth of data volume, storage systems place higher demands on the real-time performance of message transmission.

[0005] In related technologies, channels are typically used as the carriers for message transmission. Messages are allocated to corresponding channels based on their characteristics and transmitted using protocols adapted to those characteristics. However, this channel allocation process introduces additional time overhead, resulting in high message transmission latency. Summary of the Invention

[0006] This application provides a message transmission method, apparatus, electronic device, computer-readable storage medium, and product to at least solve the problem of high message transmission latency in related technologies.

[0007] According to the first aspect, this application provides a message transmission method, comprising: receiving a message transmission request, the message transmission request including a message to be transmitted and a target node identifier; determining a target multiplexing channel according to the message transmission request through an idle multiplexed list; attaching the message to be transmitted to the target multiplexing channel, and transmitting the message to be transmitted to the target node corresponding to the target node identifier through the target multiplexing channel.

[0008] According to the second aspect, this application provides a message transmission method, including: receiving a message to be processed sent by a sending node; determining a target receiving queue corresponding to the message to be processed and storing the message to be processed in the target receiving queue; determining a target kernel corresponding to the target receiving queue, and parsing and processing the message to be processed through the target kernel to obtain the target content.

[0009] According to a third aspect, this application also provides a message transmission apparatus, comprising: a first receiving module configured to receive a message sending request, the message sending request including a message to be sent and a target node identifier; a determining module configured to determine a target multiplexing channel based on the message sending request through an idle multiplexable list; and a first sending module configured to attach the message to be sent to the target multiplexing channel and send the message to be sent to the target node corresponding to the target node identifier through the target multiplexing channel.

[0010] According to the fourth aspect, this application also provides a message transmission device, comprising: a second receiving module configured to receive a message to be processed sent by a sending node; a queue module configured to determine the target receiving queue corresponding to the message to be processed and store the message to be processed in the target receiving queue; and a parsing module configured to determine the target kernel corresponding to the target receiving queue, and parse the message to be processed through the target kernel to obtain the target content.

[0011] According to a fifth aspect, this application also provides an electronic device, comprising: a memory configured to store a computer program; and a processor configured to implement the steps of any of the above-described message transmission methods when executing the computer program.

[0012] According to a sixth aspect, this application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described message transmission methods.

[0013] According to the seventh aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described message transmission methods.

[0014] By using multiplexed channels for message transmission, this application avoids the message transmission delay problem caused by channel allocation, as it eliminates the need to allocate channels for messages to be sent through a channel pool. Therefore, it solves the problem of high message transmission delay and achieves the technical effect of improving message transmission efficiency. Attached Figure Description

[0015] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 is a schematic diagram of an application scenario of a message transmission method provided in an embodiment of this application;

[0017] Figure 2 is a flowchart illustrating a message transmission method provided in an embodiment of this application;

[0018] Figure 3 is a flowchart illustrating a message transmission method provided in an embodiment of this application;

[0019] Figure 4 is a schematic diagram of channel multiplexing provided in an embodiment of this application;

[0020] Figure 5 is a schematic diagram of the update process provided in an embodiment of this application;

[0021] Figure 6 is a schematic diagram of message response provided in an embodiment of this application;

[0022] Figure 7 is a flowchart illustrating a message transmission method provided in an embodiment of this application;

[0023] Figure 8 is a schematic diagram of the queue parallel scheme provided in the embodiments of this application;

[0024] Figure 9 is a schematic diagram of message response provided in an embodiment of this application;

[0025] Figure 10 is a schematic diagram of a message transmission device provided in an embodiment of this application;

[0026] Figure 11 is a schematic diagram of a message transmission device provided in an embodiment of this application;

[0027] Figure 12 is a schematic diagram of a message transmission device provided in an embodiment of this application;

[0028] Figure 13 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0030] It should be noted that, in the description of this application, 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. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0031] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation portals for users to choose to authorize or refuse.

[0032] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0033] The specific application environment architecture or specific hardware architecture on which the execution of the message transmission method depends is described herein. Referring to Figure 1, which is a schematic diagram of an application scenario of a message transmission method provided in an embodiment of this application, the following example illustrates the scenario: In a distributed storage system, message transmission is performed between multiple distributed nodes to achieve goals such as data consistency, resource collaboration, or performance optimization among the multiple distributed nodes.

[0034] In some embodiments, message transmission is performed through a channel for any node that sends a message.

[0035] The channel, or logical or physical transmission channel, is the core carrier connecting the sending and receiving nodes. In some embodiments, the content or metadata of the message to be sent is written to a pre-allocated memory buffer in the channel. The underlying hardware driver is then invoked to submit the message to be sent from the channel memory to the network device, which then sends the message to the receiving node.

[0036] In related technologies, the sending node maintains a channel pool, which includes a set of channel resources. These resources are allocated as needed. Each time a message is sent, the sending node allocates a channel from the channel pool and sends the message through the allocated channel. After sending the message, the channel is returned to the channel pool. The channel allocation process needs to be repeated for the next message transmission.

[0037] However, in the related technical solutions, channel allocation is time-consuming before each message can be sent, and message sending can only be performed after channel allocation is completed, resulting in high overall message sending latency.

[0038] The message transmission method provided in this application aims to solve the technical problem in related technologies that requires channel allocation before message transmission can be performed, resulting in high overall message transmission latency.

[0039] Figure 2 is a flowchart illustrating the message transmission method provided in an embodiment of this application. As shown in Figure 2, an embodiment of this application provides a message transmission method, which is described in detail below:

[0040] S201. Receive a message sending request. The message sending request includes the message to be sent and the target node identifier.

[0041] In this embodiment, the execution entity is the sending node, that is, the node that sends messages to other nodes.

[0042] In some embodiments, the sending node may include at least one application module, each application module being configured to perform a specific function. During the execution of the function, the application module generates a message to be sent and generates a message sending request based on the message to be sent. The target node identifier is the node identifier of the target node to which the message to be sent is indicated by the message sending request.

[0043] With the illustration of a scenario, by explicitly indicating the message to be sent and the target node identifier, the sending node can accurately send the message to the target node, thereby improving the accuracy of message transmission.

[0044] S202. Based on the message sending request, determine the target multiplexing channel through the idle multiplexable list.

[0045] In some embodiments, the target multiplexed channel is an idle channel stored in the memory of the transmitting node.

[0046] In some embodiments, after each channel completes message transmission, it is not returned to the channel pool. When message transmission is performed again, there is no need to perform channel allocation. Instead, the channel in memory is used directly to perform message transmission.

[0047] With the example scenario, after a channel is allocated through the channel pool, it is stored in memory and marked as "active." Messages are sent through "active" channels. After sending a message, the channel is marked as "idle" and does not need to be returned to the channel pool. "Idle" channels can then be used to send other messages.

[0048] In some embodiments, the list of available reusable channels includes location information of at least one available channel, which is the storage location of the available channel in memory. The available channel can be accurately obtained through the location information.

[0049] S203. Mount the message to be sent to the target multiplexing channel and send the message to be sent to the target node corresponding to the target node identifier through the target multiplexing channel.

[0050] In some embodiments, mounting refers to the process of binding the data content and / or protocol control information of the message to be sent to a pre-allocated buffer of the target multiplexed channel. The mounting process does not require data copying. It is understood that by not performing data copying, processor overhead can be reduced.

[0051] In some embodiments, the network address of the target node is determined and stored in the static protocol header of the target multiplexed channel to accurately send the message to be sent to the network address corresponding to the target node.

[0052] In some embodiments, the sending node's network device (e.g., a network interface card) reads data from a pre-allocated buffer, encapsulates it into a network data packet according to the format of a static protocol header, and sends it to the network address corresponding to the target node.

[0053] The message transmission method provided in this application embodiment receives a message sending request, which includes a message to be sent and a target node identifier; based on the message sending request, a target multiplexed channel is determined through an idle and reusable list; the message to be sent is attached to the target multiplexed channel, and the message to be sent is sent to the target node corresponding to the target node identifier through the target multiplexed channel. This scheme transmits messages through a multiplexed channel. Since it does not require the operation of allocating a channel for the message to be sent through a channel pool, it avoids the message transmission latency problem caused by channel allocation. Therefore, it can solve the problem of high message transmission latency and achieve the technical effect of improving message transmission efficiency.

[0054] Based on any of the above embodiments, the detailed process of message transmission will be described below with reference to Figure 3.

[0055] Figure 3 is a flowchart illustrating a message transmission method provided in an embodiment of this application. As shown in Figure 3, the method includes:

[0056] S301. Receive a message sending request. The message sending request includes the message to be sent and the target node identifier.

[0057] It should be noted that the execution process of S301 is the same as that of S201, and will not be repeated here.

[0058] S302. Determine multiple candidate channels from memory using multiple channel pointers stored in the idle reusable list.

[0059] In some embodiments, each channel pointer corresponds to the location information of an idle and unreclaimed channel in memory. Multiple candidate channels can be retrieved from memory based on multiple channel pointers. Each candidate channel is an idle and unreclaimed channel.

[0060] In some embodiments, channels are stored in contiguous memory blocks. Each channel is stored in a contiguous memory block after being allocated from the channel pool. By using contiguous memory blocks, the additional overhead caused by cross-memory block access when acquiring a candidate channel can be avoided, thereby improving the efficiency of acquiring a candidate channel.

[0061] With the example of the scenario, the corresponding candidate channel can be obtained directly through the channel pointer without dynamic addressing, which can achieve fast acquisition of candidate channels.

[0062] S303. Determine the channel states corresponding to multiple candidate channels.

[0063] In some embodiments, each candidate channel may include at least one channel state.

[0064] In some embodiments, channel status may include historical error rate, load, or available bandwidth, etc.

[0065] With the help of scenario examples, channel status can be used to evaluate candidate channels from multiple dimensions, and a more suitable channel can be selected for sending messages based on the evaluation results.

[0066] S304. Sort the multiple candidate channels according to the multiple channel states to obtain the channel order.

[0067] In some embodiments, the sorting process is performed according to a preset sorting strategy. The sorting strategy may include a focus on channel state types, and the sorting process is performed based on the focus on channel state types. For example, if the focus is on load, multiple candidate channels are sorted according to the load magnitude.

[0068] In some embodiments, the sorting strategy includes a weight for each channel state type, and sorting is performed based on the weight. For example, the channel state of each candidate channel includes historical error rate and load. The historical error rate and load are weighted according to the weight to obtain the overall channel state of each candidate channel, and the multiple candidate channels are sorted according to the overall channel state.

[0069] Based on the above implementation methods, the channel ordering obtained through sorting can reflect the priority order of multiple candidate channels. Sending messages through a candidate channel with higher priority has higher data transmission performance, while sending messages through a candidate channel with lower priority has lower data transmission performance, thereby accurately determining the target multiplexing channel.

[0070] S305. Determine the target multiplexing channel from multiple candidate channels according to the channel order.

[0071] In some embodiments, the candidate channel with the highest ranking in the channel ranking is determined as the target multiplexing channel. The channel ranking reflects the priority of multiple channels, with the highest-ranked channel having higher priority.

[0072] With the example of the scenario, the candidate channel with the highest ranking has better overall performance. Identifying the candidate channel with better overall performance as the target multiplexing channel can improve the performance of sending messages through the target multiplexing channel.

[0073] In some embodiments, the target multiplexing channel is determined based on the message sending request.

[0074] With the help of scenario examples, each message sending request has different channel requirements. For core messages, a high-priority multiplexed channel is needed to ensure timely message delivery. For non-core messages, the channel requirements are lower. In this case, the highest-priority multiplexed channel can be assigned to core messages, and a lower-priority multiplexed channel can be assigned to non-core messages. This achieves overall planning and improves the overall data transmission performance of the sending node.

[0075] S306. Mount the message to be sent to the target multiplexing channel and send the message to be sent to the target node corresponding to the target node identifier through the target multiplexing channel.

[0076] In some embodiments, after sending the message to be sent, the process may further include: resetting the target multiplexing channel to obtain a reset channel; updating the idle multiplexable list according to the reset channel to obtain an updated list, which is used for multiplexing the channel.

[0077] In some embodiments, the reset process includes, but is not limited to, deleting message length, deleting temporary buffer contents, or deleting network addresses.

[0078] In some embodiments, the channel state of the reset channel is modified to "idle" so that the transmitting node can accurately determine whether the channel is available based on the channel state.

[0079] In some embodiments, the channel pointer for resetting the channel is determined, and the channel pointer for resetting the channel is added to the idle reusable list to obtain an updated list.

[0080] With scenario examples, the channel multiplexing process can include: Message transmission: Transmitting the message to be sent through the selected target multiplexed channel. Channel state reset: After message transmission is complete, releasing resources and resetting parameters of the target multiplexed channel. Channel reset generation: Reassessing the availability of the channel based on the reset channel state. Idle list update: Dynamically refreshing the system's idle and reusable list based on the evaluation results of the reset channel. Multiplexing decision: Using the updated list for the next channel selection, forming a closed-loop management. It can be understood that through closed-loop management, the update cycle of the idle and reusable list can be shortened to accurately respond to network changes. Through reset and multiplexing, channel utilization can be improved.

[0081] In some embodiments, channel reset is used to ensure that the channel can quickly recover to a reusable state after release, avoiding residual states from affecting subsequent decisions. At the physical layer, the transmit power of the target multiplexed channel can be turned off to release the occupied spectrum resources. The transmit / receive buffers associated with the target multiplexed channel are cleared to prevent interference from residual data packets. Historical interference statistics for the target multiplexed channel are reset. The automatic repeat request counter and the hybrid automatic repeat request process are reset to prevent historical repeat records from affecting subsequent reliability assessments.

[0082] In some embodiments, the update process may include: adding reusable channels by adding evaluated reset channels to the idle reusable list; conflict avoidance by suspending updates until the interference is resolved if there is strong interference between the reset channel and the currently used channel (e.g., excessive frequency overlap); removing failed channels by deleting channels from the idle reusable list that have entered a cooling-off period or are permanently disabled; dynamic blacklisting by automatically adding channels that fail three consecutive evaluations to the blacklist or returning them to the channel pool; and priority adjustment by reordering updates based on historical channel performance (e.g., average throughput, stability, etc.).

[0083] In some embodiments, reusing the update list may include: real-time selection, where the sorting strategy (e.g., sorting by priority in descending order) is directly applied based on the update list during the next message transmission; load balancing, where if the highest priority channel has a load >60%, the next best channel with a load <40% is selected from the list to avoid congestion; and collision prevention, where after selecting a channel, interference cross-validation is performed with the currently active channel to ensure there are no collisions before transmission.

[0084] In some embodiments, the target multiplexed channel is updated immediately after message transmission to avoid using outdated channel information. A cooling-off period and blacklist mechanism automatically isolate abnormal channels, reducing the need for manual intervention. The decoupling design of the target multiplexed channel update process from the multiplexing decision ensures uninterrupted service during handover.

[0085] The channel multiplexing will now be explained with reference to Figure 4.

[0086] Figure 4 is a schematic diagram of channel multiplexing provided in an embodiment of this application. As shown in Figure 4, active channels are allocated from the channel pool, and messages are sent through these active channels. After the message is sent, the active channel becomes an idle channel. Idle channels are not returned to the channel pool. Instead, the idle reusable list is updated using the idle channels. The idle reusable list allows for quick acquisition of reusable channels, and sending messages through reusable channels avoids the transmission delay caused by channel allocation.

[0087] In some embodiments, by resetting the channel and updating the list of idle reusable channels instead of reclaiming the channel, the transmission delay caused by the reallocation of the channel when the next message sending request is executed after the channel is reclaimed can be avoided, thereby improving message transmission efficiency.

[0088] In some embodiments, the update process can be performed to obtain an update list by the following method: performing anomaly verification on the reset channel to obtain a first verification result, wherein the first verification result is that the channel is abnormal or the channel is not abnormal; if the first verification result is that the channel is not abnormal, storing the channel pointer of the reset channel into the idle reusable list to obtain the update list; if the first verification result is that the channel is abnormal, storing the reset channel into the channel pool, obtaining an idle channel from the channel pool, and storing the channel pointer of the idle channel into the idle reusable list to obtain the update list.

[0089] In some embodiments, anomaly verification processing may include verifying whether the historical error rate of the reset channel meets the standard, verifying whether the reset channel protocol is normal, or sending a lightweight probe message and detecting the response time. The first verification result is used to indicate whether the reset channel can be used. In some embodiments, physical layer metrics, such as signal-to-noise ratio and / or bit error rate, may be detected. Residual interference may be detected, such as measuring whether the leakage power of adjacent channels is normal. Hardware status detection may be performed, such as reading the RF front-end status register and determining whether it is normal by judging whether the hardware fault flag bit is set.

[0090] The update process will now be explained with reference to Figure 5.

[0091] Figure 5 is a schematic diagram of the update process provided in the embodiment of this application. As shown in Figure 5, for any reset channel, an anomaly verification process is performed on the reset channel. The anomaly verification process is used to verify whether the reset channel can normally execute subsequent message sending. If the channel is not abnormal, it means that the reset channel can be used normally. The idle and reusable list is updated through the reset channel, and subsequent message sending can be directly implemented through the reset channel. If the channel is abnormal, it means that the reset channel cannot be used normally. To avoid the reset channel affecting message sending, the reset channel is recycled to the channel pool, and an idle channel is reallocated from the channel pool. The idle channel is used to update the idle and reusable list instead of the reset channel.

[0092] In some embodiments, reclaiming and resetting channels and reallocating idle channels can be performed synchronously or in stages.

[0093] In some embodiments, during the process of reclaiming and resetting channels and reallocating idle channels, the reset channel has already completed its message transmission task. If a new message transmission request is received during this process, another channel can be determined from the idle and reusable list for message transmission without affecting the execution of other message transmission requests, thereby improving message transmission efficiency.

[0094] In some embodiments, the anomaly verification and recycling mechanism can prevent the direct reuse of abnormal channels from affecting subsequent message transmission, thereby improving the reliability of message transmission.

[0095] In some embodiments, the message transmission method further includes: determining a verification period; performing anomaly verification processing on channels in the idle reusable list according to the verification period to obtain a second verification result, wherein the second verification result is that the channel is abnormal or the channel is not abnormal; and reclaiming abnormal channels in the idle reusable list through a channel pool according to the second verification result.

[0096] In some embodiments, the verification cycle is the cycle for verifying the idle reusable list, and the verification cycle can be used to achieve automated verification.

[0097] In some embodiments, the appropriate verification period can be dynamically adjusted based on information such as the service requirements and load of the sending node.

[0098] With the help of scenario examples, normal channels may become abnormal over time due to external or internal reasons. Regular verification can help detect abnormal channels in a timely manner and reclaim them.

[0099] In some embodiments, after abnormal channels are reclaimed, normal channels are allocated from the channel pool, and the idle reusable list is updated through normal channels to ensure that there are enough idle channels for reuse, thus avoiding the problem of low transmission efficiency caused by allocating channels only when they are needed.

[0100] In some embodiments, by periodically verifying the channel, abnormal channels can be recovered in a timely manner, which can prevent abnormal channels from affecting subsequent message transmission, thereby improving the reliability of message transmission.

[0101] In some embodiments, the message transmission method further includes: determining a target channel identifier for a target multiplexed channel; determining a first correspondence between the channel identifier and a port resource identifier; determining a target port resource identifier based on the target channel identifier and the first correspondence, and determining a target port resource based on the target port resource identifier; and storing the message to be sent in the target port resource.

[0102] Among them, the port resource is a resource pool used by the sending node to temporarily store messages to be sent. In the event of a message sending failure, the message can be resent using the messages to be sent stored in the resource pool to improve the reliability of message transmission.

[0103] In related technologies, the number of channels differs from the number of port resources, and there is no direct correspondence between channels and port resources. These technologies determine the target port resource by traversing a list of port resources, but this traversal process is time-consuming, leading to low message transmission efficiency.

[0104] In some embodiments, the target channel identifier is a unique identifier for the target multiplexed channel, used to accurately locate the target multiplexed channel.

[0105] In some embodiments, the target channel identifier can be statically assigned: the identifier is generated according to predefined rules, such as combining channel frequency bands, bandwidth, or time slot numbers to obtain the target channel identifier. The target channel identifier can also be dynamically generated: a unique identifier is automatically assigned by the system or channel pool when the target multiplexed channel is created to ensure global uniqueness.

[0106] In some embodiments, the channel identifier and the port resource identifier in this application have a one-to-one correspondence.

[0107] In some embodiments, each channel is bound to a port resource, and the association between the two is maintained through a preset mapping table or a dynamic configuration protocol. The mapping table can be maintained statically: during system initialization, the correspondence between channels and ports is defined through a configuration file (e.g., channel ID (Identifier) ​​"CH_001" is mapped to port ID "RF_PORT_1"). Alternatively, the mapping table can be maintained dynamically: the mapping relationship is adjusted in real time according to network conditions; for example, if a port resource is overloaded, the channel is dynamically bound to a backup port resource.

[0108] In some embodiments, the mapping relationship is stored in memory or a database in the form of key-value pairs, supporting fast querying and updating.

[0109] In some embodiments, each port resource is associated with an independent send buffer for temporary storage of messages to be sent. The send buffer is typically divided into queues based on priority (e.g., a high-priority queue stores urgent control commands, and a normal queue stores data streams). Messages to be sent are encapsulated into standardized data packets according to the protocols supported by the port resource. The send queue with the corresponding priority is selected based on the message's service type. The port driver interface is called to write the data packets into the buffer, awaiting hardware or protocol stack scheduling for transmission.

[0110] In some embodiments, upon detecting a hardware failure of a port resource or a persistently high packet loss rate, the port resource is automatically marked as "unavailable," and the mapping table is updated to switch the originally bound channel to a backup port resource. In the event of network topology changes or adjustments in service requirements, the binding relationship between channels and port resources is dynamically updated via a control plane protocol. When the buffer is nearing full capacity, flow control mechanisms are triggered (such as pausing writes or discarding low-priority data) to ensure that high-priority services are not affected.

[0111] With the example of the scenario, the target port resources can be quickly determined after the target multiplexed channel is determined by the first correspondence.

[0112] In some embodiments, the target port resource can be quickly determined through the first correspondence, thereby improving the efficiency of message transmission. End-to-end directional transmission is achieved through a unique identifier and mapping table, avoiding data mistransmission. Independent port resources and buffer design ensure that different services do not interfere with each other. Dynamic binding and mapping adjustment are supported to adapt to network expansion or reconstruction. Anomaly detection and automatic switching mechanisms ensure transmission continuity.

[0113] In some embodiments, a message to be sent can be stored in a target resource port by: determining unsent messages of the sending node and determining the transmission load based on the unsent messages; determining whether to perform message aggregation processing based on the transmission load; if message aggregation processing is performed based on the transmission load, performing message aggregation processing on the unsent messages and the message to be sent to obtain a first aggregated message, and storing the first aggregated message in the target port resource; if message aggregation processing is not performed based on the transmission load, storing the message to be sent in the target port resource.

[0114] Among them, message aggregation means aggregating multiple messages to a port resource for unified sending, and the multiple messages can come from different application modules.

[0115] In some embodiments, the sending node includes a window layer and an communication layer.

[0116] In related technologies, message aggregation is performed at the window layer for any scenario, and the aggregated message is sent to the communication layer, which then sends the aggregated message to the receiving node. This may result in excessive load pressure on message sending.

[0117] In some embodiments, message aggregation can improve the utilization of communication resources on the one hand, and send multiple messages at once on the other hand, it can increase the transmission load.

[0118] In some embodiments, the current transmission load of the sending node is determined based on the number and size of messages that the sending node has not sent.

[0119] In some embodiments, when the transmission load is greater than or equal to a preset value, message aggregation processing is not performed, and only the message to be sent is sent. When the transmission load is less than the preset value, message aggregation processing is performed, and the first aggregated message is sent.

[0120] With scenario examples, in scenarios with high transmission load, avoiding message aggregation simplifies the processing flow and reduces latency caused by transmission load. In scenarios with low transmission load, message aggregation maximizes the utilization of communication resources. Under low transmission load pressure, sending aggregated messages maximizes the use of communication resources, meaning a single request can transmit multiple messages, regardless of which application module the messages originate from. However, under sufficiently high transmission load pressure, sending aggregated messages needs to be reduced. Reducing message aggregation simplifies the processing flow and improves message sending efficiency. The application module itself decides whether to aggregate messages. Large messages can be sent directly to the window layer individually, while small messages with low latency requirements can be aggregated into a larger message and sent to the window layer. For the window layer and communication layer, receiving messages from application modules directly matches port resources and uses the channel to transmit them to the other node, without considering aggregation, thus improving message sending efficiency.

[0121] In some embodiments, by flexibly performing message aggregation processing, excessive transmission load can be avoided from affecting message transmission, while maximizing the utilization of communication resources.

[0122] In some embodiments, message aggregation processing can be performed by: determining an aggregation margin based on the transmission load; and performing message aggregation processing on unsent messages and messages to be sent based on the aggregation margin to obtain a first aggregated message.

[0123] In some embodiments, the aggregation margin determined based on the transmission load can ensure that the transmission load will not be exceeded after message aggregation processing.

[0124] With the help of scenario examples, the aggregation margin indicator shows how much of the unsent messages can be aggregated.

[0125] In some embodiments, by determining the aggregation margin, it is possible to specify how many messages will be aggregated, thereby improving the accuracy of message aggregation processing.

[0126] In some embodiments, message aggregation processing and storage of the message to be sent to the target port resource can also be performed by the following method: determining the message type of the message to be sent from the message header of the message to be sent, wherein the message type is real-time stream or batch data; if the message type of the message to be sent is real-time stream, storing the message to be sent to the target port resource; if the message type of the message to be sent is batch message, performing message aggregation processing on the unsent message and the message to be sent to obtain a second aggregated message, and storing the second aggregated message to the target port resource.

[0127] In some embodiments, real-time streaming messages have high latency requirements and need to be sent quickly, such as messages from video calls. Batch data types of messages have lower latency requirements, such as log files or offline tasks.

[0128] With scenario examples, for real-time streaming messages with high latency requirements, sending them directly without aggregation avoids increased latency caused by waiting for aggregation, ensuring real-time transmission. For batch data types with low latency requirements, aggregation processing maximizes the utilization of communication resources and reduces the number of transmissions.

[0129] In some embodiments, flexible aggregation processing can determine whether to perform message aggregation based on the actual scenario, avoiding message aggregation from affecting the normal sending of messages, thereby improving message transmission efficiency.

[0130] In some embodiments, the message transmission method further includes: receiving a response sequence number sent by a target node and asynchronously storing the response sequence number in the response processing queue of the sending node; and performing message response processing based on the response sequence number in the response processing queue.

[0131] The response processing involves the receiving node sending a response indication to the sending node after receiving the message, indicating that the receiving node has received the message, and the sending node destroys the corresponding message according to the response indication.

[0132] In some embodiments, the acknowledgment process occurs when the receiving node, after receiving a message, feeds back the sequence number of the received message queue to the sending node. The sequence number can be transmitted in two ways: the receiving node issues a read request protocol command, obtains the local sequence number, and writes it into the command description block byte of the protocol command; the sending node, when sending a message back, obtains the local sequence number and writes it into the command description block byte of the protocol command. After the protocol command carrying the sequence number reaches the message sending node and is received by the sending node's communication layer, it asynchronously transmits the kernel containing the sent message to perform the acknowledgment operation. The acknowledgment operation may include: comparing the feedback sequence number with the linked list of the sent message queue (including sent but not yet retrieved messages); if the sequence number of any message in the linked list is smaller than the feedback sequence number, it is removed from the linked list, and the business module is serially executed to retrieve and destroy the message. This process is repeated for each message in the linked list until the condition is no longer met. Because the acknowledgment process is part of the message transmission flow, it takes up a certain amount of time in the message transmission process. This delays the start time of the sending end's channel idle waiting and causes a delay in the receiving end's parsing and forwarding of the message content.

[0133] In related technologies, after receiving an acknowledgment, the sending node determines the corresponding message based on the acknowledgment. The channel remains idle until the corresponding message is destroyed, resulting in a long idle waiting time and consequently low message transmission efficiency.

[0134] In some embodiments, the response sequence number is the sequence number corresponding to the message.

[0135] In some embodiments, there is a one-to-one correspondence between messages and sequence numbers, and the corresponding message can be accurately identified through the sequence number.

[0136] In some embodiments, by asynchronously storing the response sequence number and performing the response processing, the channel does not need to wait for the response to be completed.

[0137] In some embodiments, asynchronous response processing can decouple the response from message transmission, avoiding the impact of waiting for the response on message transmission, thereby improving the efficiency of message transmission.

[0138] In some embodiments, message response processing can be performed by the following method: determining a message queue, in which sent messages are stored; determining at least one message to be destroyed from the message queue according to the response sequence number, wherein the sequence number of the at least one message to be destroyed is less than or equal to the response sequence number; and performing asynchronous destruction processing on the at least one message to be destroyed to achieve message response processing.

[0139] The message response will now be explained with reference to Figure 6.

[0140] Figure 6 is a schematic diagram of message response provided in an embodiment of this application. As shown in Figure 6, each message in the message queue has a corresponding sequence number. Based on the response sequence number 004, messages with sequence numbers less than or equal to 004 in the message queue are extracted as messages to be destroyed. These messages are then destroyed.

[0141] In some embodiments, asynchronous destruction can be used to perform message destruction and message transmission simultaneously, thereby improving message transmission efficiency.

[0142] In some embodiments, at least one message to be destroyed can be quickly identified from the message queue using a response sequence number, thereby improving the efficiency of message response.

[0143] In some embodiments, the message transmission method further includes: removing at least one message to be destroyed from the target port resource.

[0144] With the scenario example as an illustration, after completing the message acknowledgment, it indicates that the receiving node has received the message, and the message transmission task is complete. Remove the messages to be destroyed from the target port resources to prevent unwanted messages from continuously occupying target port resources.

[0145] In some embodiments, removing at least one message to be destroyed from the target port resource enables the target port resource to process subsequent message transmissions normally, thereby improving the reliability of message transmission.

[0146] Figure 7 is a flowchart illustrating the message transmission method provided in an embodiment of this application. As shown in Figure 7, an embodiment of this application provides a message transmission method, which is described in detail below:

[0147] S701, Receive pending messages sent by the sending node.

[0148] In this embodiment, the executing entity is the receiving node.

[0149] In some embodiments, the message to be processed is a message that the sending node instructs the receiving node to process.

[0150] In some embodiments, the receiving node may include at least one application module, each application module being configured to process the message content in a specified message, the message content being obtained through parsing to achieve a specific function.

[0151] S702. Determine the target receiving queue corresponding to the message to be processed, and store the message to be processed in the target receiving queue.

[0152] In related technologies, messages received by the receiving node are stored in a unified queue, and messages in the queue are processed sequentially according to their order. Later messages in the queue need to wait in line, and when there are many messages in the queue, the waiting time can lead to low message processing efficiency.

[0153] In some embodiments, the receiving node of this application sets up multiple queues, and the target receiving queue is the queue corresponding to the message to be processed.

[0154] In some embodiments, multiple queues are processed in parallel without interference between them, thereby improving message processing efficiency.

[0155] In some embodiments, the target receiving queue can be determined by the following method: determining the target module identifier in the message header of the message to be processed; determining a second correspondence between the module identifier and the receiving queue; and determining the target receiving queue based on the target module identifier and the second correspondence.

[0156] In some embodiments, the module identifier is a unique identifier for the module. The target module can be accurately identified by the target module identifier. The target application module is the application module that the sending node indicates in the message header to process the message.

[0157] In some embodiments, a second correspondence relationship represents a one-to-one correspondence between application modules and receiving queues.

[0158] The parallel queue scheme will now be explained with reference to Figure 8.

[0159] Figure 8 is a schematic diagram of the queue parallel scheme provided in an embodiment of this application. As shown in Figure 8, each application module corresponds to a receiving queue, and each application module is configured to process messages in its corresponding receiving queue. Multiple application modules process multiple receiving queues in parallel, without interference between different application modules. Compared to processing a single receiving queue, parallel processing of multiple receiving queues can effectively improve message processing efficiency.

[0160] In some embodiments, the target receiving queue can be quickly determined and the messages to be processed can be assigned to the target receiving queue through the second correspondence, thereby improving message processing efficiency.

[0161] S703. Determine the target kernel corresponding to the target receiving queue, and use the target kernel to parse and process the message to be processed to obtain the target content.

[0162] The target content refers to the content in the message to be processed that needs to be processed by the application module.

[0163] In some embodiments, the target kernel is a dedicated kernel for parsing messages in the target receive queue.

[0164] In some embodiments, a kernel is pre-allocated to each receive queue.

[0165] In some embodiments, the message transmission method further includes: determining the module to be allocated and the module identifier of the module to be allocated; determining an idle kernel from the receiving node; establishing an idle queue corresponding to the idle kernel; and updating a second correspondence based on the module identifier of the module to be allocated and the idle queue.

[0166] The kernel provides computing resources, which are used to process messages. An idle kernel is a kernel that is not currently assigned to any queue.

[0167] In some embodiments, the module to be allocated is an application module not included in the second correspondence, and the idle kernel is a kernel not included in the second correspondence.

[0168] In some embodiments, for scenarios where a new application module is added to the receiving node, a queue and kernel are allocated to the new application module, and the second correspondence is updated. Subsequent messages related to the new application module are processed by the queue and kernel corresponding to the new application module.

[0169] With the help of scenario examples, each queue is bound to a dedicated kernel, and the dedicated kernel processes the messages in the corresponding queue.

[0170] In some embodiments, by assigning a dedicated kernel to each queue, message processing efficiency can be effectively improved compared to having one kernel handle multiple queues.

[0171] In some embodiments, the message transmission method further includes: determining multiple candidate sequence numbers corresponding to multiple messages in a target receiving queue; determining a target sequence number based on the multiple candidate sequence numbers, wherein the target sequence number is greater than any other sequence number among the multiple candidate sequence numbers; and sending the target sequence number to the sending node.

[0172] In some embodiments, the receiving node responds to the sending node by sending a target sequence number.

[0173] With the example scenario, the receiving node can receive multiple messages, each corresponding to a sequence number. For instance, these sequence numbers might be 001, 002, 003, and 004. The largest sequence number, 004, represents all the messages with sequence numbers less than or equal to 004. The sending node can then use the sequence number 004 to determine if the receiving node has received messages with sequence numbers less than or equal to 004.

[0174] The message response will now be explained with reference to Figure 9.

[0175] Figure 9 is a schematic diagram of message response provided in an embodiment of this application. As shown in Figure 9, the sending node receives the message to be sent and performs channel allocation, port resource matching, and flexible aggregation. The sending node sends the message to the receiving node. The receiving node processes the message through the corresponding application module and sends the target sequence number to the sending node. The target node performs response processing based on the target sequence number.

[0176] In some embodiments, by selecting a target sequence number from a plurality of candidate sequence numbers and sending it to the sending node, communication resource overhead can be reduced and message transmission efficiency can be improved compared to sending a plurality of candidate sequence numbers.

[0177] In some embodiments, the message transmission method further includes: determining the number of messages to be parsed in the target receiving queue and a quantity threshold; if the number of messages to be parsed is greater than or equal to the quantity threshold, determining a new kernel from the idle kernel pool, and establishing a third correspondence between the target receiving queue and the new kernel, wherein the new kernel is used to parse and process the messages in the target receiving queue.

[0178] In some embodiments, if the number of messages to be parsed is greater than or equal to a threshold, it indicates that the kernel corresponding to the target receiving queue is under heavy processing pressure. Adding a kernel is used to alleviate the processing pressure on the target receiving queue and improve parsing efficiency.

[0179] With the example scenario, each message in the target receive queue corresponds to an application module. When an application module has a large number of messages, storing these messages in the target receive queue increases the processing load on the corresponding kernel, making it difficult to process multiple messages in the target receive queue in a timely manner. By adding a new kernel to work in conjunction with an existing kernel, the messages in the target receive queue can be processed much earlier.

[0180] In some embodiments, flexibly increasing the number of kernels according to the number of messages in the target receive queue can ensure that the messages in the target receive queue are processed in a timely manner, thereby improving message processing efficiency.

[0181] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0182] Figure 10 is a schematic diagram of the structure of a message transmission device provided in an embodiment of this application. As shown in Figure 10, an embodiment of this application also provides a message transmission device 100, which may include: a first receiving module 101, a determining module 102, and a first sending module 103, wherein:

[0183] The first receiving module 101 is configured to receive message sending requests, which include the message to be sent and the target node identifier.

[0184] The determination module 102 is configured to determine the target multiplexing channel based on the message sending request and the idle multiplexing list.

[0185] The first sending module 103 is configured to attach the message to be sent to the target multiplexing channel and send the message to be sent to the target node corresponding to the target node identifier through the target multiplexing channel.

[0186] In some embodiments, the first receiving module 101 may execute S201 in the embodiment of FIG2.

[0187] In some embodiments, the determining module 102 may perform S202 in the embodiment of FIG2.

[0188] In some embodiments, the first sending module 103 may execute S203 in the embodiment of FIG2.

[0189] It should be noted that the message transmission device shown in the embodiments of this application can execute the technical solution shown in the above method embodiments, and its implementation principle and beneficial effects are similar, so they will not be described again here.

[0190] In some embodiments, the determining module 102 is configured to:

[0191] Multiple candidate channels are determined from memory using multiple channel pointers stored in the idle reusable list;

[0192] Determine the channel states corresponding to multiple candidate channels;

[0193] Multiple candidate channels are sorted according to multiple channel states to obtain a channel ranking.

[0194] Based on the channel ordering, the target multiplexing channel is determined from multiple candidate channels.

[0195] Figure 11 is a schematic diagram of a message transmission device provided in an embodiment of this application. Based on the embodiment shown in Figure 10, as shown in Figure 11, the message transmission device 110 further includes: a reset module 104, a recycling module 105, a storage module 106, a response module 107, and a destruction module 108, wherein:

[0196] Module 104 was reset and set to:

[0197] The target multiplexing channel is reset to obtain the reset channel;

[0198] The idle reusable list is updated based on the reset channel to obtain an updated list, which is then used for channel reusability.

[0199] In some embodiments, the reset module 104 is configured to:

[0200] Anomaly verification is performed on the reset channel to obtain the first verification result, which is either a channel anomaly or a channel not anomaly.

[0201] If the first verification result indicates that the channel is not abnormal, the channel pointer for resetting the channel is stored in the idle and reusable list, thus obtaining the updated list;

[0202] If the first verification result is a channel anomaly, the reset channel is stored in the channel pool, an idle channel is obtained from the channel pool, the channel pointer of the idle channel is stored in the idle reusable list, and the updated list is obtained.

[0203] Recycling module 105 is configured as follows:

[0204] Determine the verification period, and perform anomaly verification on the channels in the idle reusable list according to the verification period to obtain the second verification result, which is either a channel anomaly or a channel not anomaly.

[0205] Based on the second verification result, abnormal channels in the idle reusable list are recycled through the channel pool.

[0206] Storage module 106 is configured as follows:

[0207] Determine the target channel identifier for the target multiplexing channel;

[0208] Determine the first correspondence between channel identifiers and port resource identifiers;

[0209] Based on the target channel identifier and the first correspondence, determine the target port resource identifier, and determine the target port resource based on the target port resource identifier;

[0210] Store the message to be sent in the target port resource.

[0211] In some embodiments, the storage module 106 is configured as follows:

[0212] Identify the unsent messages from the sending node and determine the transmission load based on the unsent messages;

[0213] Determine whether to perform message aggregation processing based on the transmission load;

[0214] When message aggregation is performed based on transmission load, message aggregation is performed on unsent messages and messages to be sent to obtain a first aggregated message, which is then stored in the target port resource.

[0215] If message aggregation is not performed based on the transmission load, the message to be sent is stored in the target port resource.

[0216] In some embodiments, the storage module 106 is configured as follows:

[0217] Determine the aggregation margin based on the transmission load;

[0218] Based on the aggregation margin, unsent messages and messages to be sent are aggregated to obtain the first aggregated message.

[0219] In some embodiments, the storage module 106 is configured as follows:

[0220] Determine the message type of the message to be sent from the message header; the message type is either real-time stream or batch data.

[0221] If the message type to be sent is a real-time stream, the message to be sent will be stored in the target port resource.

[0222] When the message type of the message to be sent is a batch message, the unsent messages and the messages to be sent are aggregated to obtain a second aggregated message, which is then stored in the target port resource.

[0223] Response module 107 is configured as follows:

[0224] Receive the response sequence number sent by the target node and asynchronously store the response sequence number into the response processing queue of the sending node;

[0225] Message response processing is performed based on the response sequence number in the response processing queue.

[0226] In some embodiments, the response module 107 is configured as follows:

[0227] Define a message queue, which stores sent messages;

[0228] Based on the response sequence number, at least one message to be destroyed is determined from the message queue, wherein the sequence number of at least one message to be destroyed is less than or equal to the response sequence number;

[0229] Asynchronous destruction is performed on at least one message to be destroyed in order to implement message response processing.

[0230] Destroy module 108 is set to:

[0231] Remove at least one message to be destroyed from the target port resource.

[0232] Figure 12 is a schematic diagram of the structure of the message transmission device provided in an embodiment of this application. As shown in Figure 12, an embodiment of this application also provides a message transmission device 120, which may include: a second receiving module 121, a queue module 122, a parsing module 123, an update module 124, a second sending module 125, and a adding module 126, wherein:

[0233] The second receiving module 121 is configured to receive pending messages sent by the sending node.

[0234] Queue module 122 is configured to determine the target receiving queue corresponding to the message to be processed and store the message to be processed in the target receiving queue.

[0235] The parsing module 123 is configured to determine the target kernel corresponding to the target receiving queue, and to parse and process the message to be processed through the target kernel to obtain the target content.

[0236] In some embodiments, the second receiving module 121 may execute S701 in the embodiment of FIG7.

[0237] In some embodiments, queue module 122 may execute S702 in the embodiment of FIG7.

[0238] In some embodiments, the parsing module 123 may execute S703 in the embodiment of FIG7.

[0239] In some embodiments, the queue module 122 is configured as follows:

[0240] Determine the target module identifier in the message header of the message to be processed;

[0241] Determine the second correspondence between module identifiers and the receiving queue;

[0242] The target receiving queue is determined based on the target module identifier and the second correspondence.

[0243] Update module 124, set to:

[0244] Determine the module to be assigned and its module identifier;

[0245] Determine the idle kernel from the receiving node;

[0246] Establish an idle queue corresponding to an idle kernel;

[0247] Update the second correspondence based on the module identifier of the module to be assigned and the free queue.

[0248] The second transmitting module 125 is configured as follows:

[0249] Determine multiple candidate sequence numbers corresponding to multiple messages in the target receive queue;

[0250] The target number is determined based on multiple candidate numbers, and the target number is greater than any other number among the multiple candidate numbers.

[0251] Send the target sequence number to the sending node.

[0252] Module 126 has been added and set as follows:

[0253] Determine the number of messages to be parsed in the target receiving queue and the number threshold;

[0254] If the number of messages to be parsed is greater than or equal to the threshold, a new kernel is determined from the idle kernel pool, and a third correspondence is established between the target receiving queue and the new kernel. The new kernel is used to parse and process the messages in the target receiving queue.

[0255] For a description of the features in the embodiment corresponding to the message transmission device, please refer to the relevant description in the embodiment corresponding to the message transmission method, which will not be repeated here.

[0256] Figure 13 is a schematic diagram of the structure of the electronic device provided in this application. As shown in Figure 13, the electronic device 130 provided in this embodiment includes at least one processor 1301 and a memory 1302. Optionally, the electronic device 130 further includes a communication component 1303. The processor 1301, the memory 1302, and the communication component 1303 are connected via a bus.

[0257] In the implementation process, at least one processor 1301 executes computer execution instructions stored in memory 1302, causing at least one processor 1301 to execute the above-described message transmission method embodiment.

[0258] The implementation process of processor 1301 can be found in the above method embodiments, and its implementation principle and technical effect are similar. Therefore, it will not be described again in this embodiment.

[0259] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0260] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0261] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0262] Embodiments of this application also provide a computer-readable storage medium, which may be a non-volatile computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described message transmission method embodiments at runtime.

[0263] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0264] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described message transmission method embodiments.

[0265] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described message transmission method embodiments.

[0266] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0267] The foregoing has provided a detailed description of a message transmission method, apparatus, electronic device, medium, and product provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A message transmission method, characterized by, include: Receive a message sending request, the message sending request including the message to be sent and the target node identifier; Based on the message sending request, the target multiplexing channel is determined through the idle and reusable list; The message to be sent is attached to the target multiplexing channel and sent to the target node corresponding to the target node identifier through the target multiplexing channel.

2. The message transmission method according to claim 1, characterized in that, The target multiplexing channel is determined by the list of available multiplexable channels, including: Multiple candidate channels are determined from memory using multiple channel pointers stored in the idle reusable list; Determine the channel states corresponding to the multiple candidate channels; The candidate channels are sorted according to the multiple channel states to obtain a channel ranking. The target multiplexing channel is determined from the plurality of candidate channels according to the channel sorting.

3. The message transmission method according to claim 1 or 2, characterized in that, After sending the message to be sent, the method further includes: The target multiplexing channel is reset to obtain a reset channel; The idle reusable list is updated according to the reset channel to obtain an updated list, which is used for reusing the channel.

4. The message transmission method according to claim 3, characterized in that, The idle reusable list is updated according to the reset channel to obtain an updated list, including: The reset channel is subjected to anomaly verification processing to obtain a first verification result, wherein the first verification result is either channel abnormal or channel not abnormal; If the first verification result indicates that the channel is not abnormal, the channel pointer of the reset channel is stored in the idle reusable list to obtain the updated list; If the first verification result indicates a channel anomaly, the reset channel is stored in the channel pool, and an idle channel is obtained from the channel pool. The channel pointer of the idle channel is stored in the idle reusable list to obtain the updated list.

5. The message transmission method according to claim 4, characterized in that, The method further includes: A verification period is determined, and anomaly verification processing is performed on the channels in the idle reusable list according to the verification period to obtain a second verification result, wherein the second verification result is either a channel anomaly or a channel not anomaly. Based on the second verification result, the abnormal channels in the idle reusable list are recycled through the channel pool.

6. The message transmission method according to claim 1 or 2, characterized in that, The method further includes: Determine the target channel identifier of the target multiplexing channel; Determine the first correspondence between channel identifiers and port resource identifiers; Based on the target channel identifier and the first correspondence, the target port resource identifier is determined, and the target port resource is determined based on the target port resource identifier; The message to be sent is stored in the target port resource.

7. The message transmission method according to claim 6, characterized in that, Storing the message to be sent into the target port resource includes: Identify any unsent messages from the sending node, and determine the transmission load based on these unsent messages; Determine whether to perform message aggregation processing based on the transmission load; When performing message aggregation processing based on the transmission load determination, the unsent messages and the messages to be sent are aggregated to obtain a first aggregated message, and the first aggregated message is stored in the target port resource; If message aggregation is not performed based on the transmission load, the message to be sent is stored in the target port resource.

8. The message transmission method according to claim 7, characterized in that, The unsent messages and the messages to be sent are aggregated to obtain a first aggregated message, including: Determine the aggregation margin based on the transmission load; Based on the aggregation margin, the unsent messages and the messages to be sent are aggregated to obtain the first aggregated message.

9. The message transmission method according to claim 6, characterized in that, Storing the message to be sent into the target port resource includes: The message type of the message to be sent is determined from the message header of the message to be sent, wherein the message type is real-time stream or batch data; If the message type of the message to be sent is a real-time stream, the message to be sent is stored in the target port resource; If the message type of the message to be sent is a batch message, the unsent messages and the message to be sent are aggregated to obtain a second aggregated message, and the second aggregated message is stored in the target port resource.

10. The message transmission method according to claim 1, characterized in that, The method further includes: Receive the response sequence number sent by the target node and asynchronously store the response sequence number into the response processing queue of the sending node; Message response processing is performed based on the response sequence number in the response processing queue.

11. The message transmission method according to claim 10, characterized in that, Message response processing is performed based on the response sequence number in the response processing queue, including: Identify a message queue that stores sent messages; Based on the response sequence number, at least one message to be destroyed is determined from the message queue, wherein the sequence number of the at least one message to be destroyed is less than or equal to the response sequence number; The at least one message to be destroyed is asynchronously destroyed in order to realize message response processing.

12. The message transmission method according to claim 11, characterized in that, The method further includes: Remove at least one message to be destroyed from the target port resource.

13. A message transmission method, characterized in that, include: Receive pending messages sent by the sending node; Determine the target receiving queue corresponding to the message to be processed, and store the message to be processed in the target receiving queue; The target kernel corresponding to the target receiving queue is determined, and the message to be processed is parsed and processed through the target kernel to obtain the target content.

14. The message transmission method according to claim 13, characterized in that, Determining the target receiving queue corresponding to the message to be processed includes: Determine the target module identifier in the message header of the message to be processed; Determine the second correspondence between module identifiers and the receiving queue; The target receiving queue is determined based on the target module identifier and the second correspondence.

15. The message transmission method according to claim 13 or 14, characterized in that, The method further includes: Determine the module to be assigned and its module identifier; Determine the idle kernel from the receiving node; Establish an idle queue corresponding to the idle kernel; The second correspondence is updated based on the module identifier of the module to be assigned and the idle queue.

16. The message transmission method according to claim 13, characterized in that, The method further includes: Determine multiple candidate sequence numbers corresponding to multiple messages in the target receiving queue; A target number is determined based on the plurality of candidate numbers, wherein the target number is greater than any other number among the plurality of candidate numbers; Send the target sequence number to the sending node.

17. The message transmission method according to claim 13, characterized in that, The method further includes: Determine the number of messages to be parsed in the target receiving queue and the number threshold; If the number of messages to be parsed is greater than or equal to the number threshold, a new kernel is determined from the idle kernel pool, and a third correspondence is established between the target receiving queue and the new kernel. The new kernel is used to parse and process the messages in the target receiving queue.

18. An electronic device, characterized in that, include: The memory is configured to store computer programs; The processor is configured to implement the steps of the message transmission method as described in any one of claims 1 to 17 when executing the computer program.

19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the message transmission method as described in any one of claims 1 to 17.

20. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the message transmission method as described in any one of claims 1 to 17.