Message Transmission Method, Device, Electronic Device, Medium and Product

By using an idle multiplexable list in a distributed storage system to determine the target multiplexed channel and directly mount the message to the channel, the problem of high message transmission delay between cluster nodes is solved, and the effect of improving message transmission efficiency is achieved.

CN119892770BActive Publication Date: 2025-06-13INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510378037.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-06-13
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

In distributed storage systems, the message transmission delay between cluster nodes is high, mainly due to the time-consuming process of allocating channels.

Method used

The target multiplexed channel is determined through the idle multiplexable list, the message to be sent is mounted to the target multiplexed channel, and the message is sent to the target node through the channel, avoiding the channel allocation operation.

Benefits of technology

It reduces the delay in message transmission, improves the efficiency of message transmission, and solves the problem of high message transmission delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892770B_ABST
    Figure CN119892770B_ABST
Patent Text Reader

Abstract

The present application discloses a message transmission method, device, electronic device, medium and product, relating to the field of communication technologies. By using a multiplexed channel for message transmission, since there is no need to perform the operation of allocating a channel for a message to be sent from a channel pool, the problem of message transmission delay caused by channel allocation can be avoided. Therefore, the problem of high message transmission delay can be solved, achieving the technical effect of improving message transmission efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a message transmission method, apparatus, electronic device, medium, and product. Background Art

[0002] In a distributed storage system, the message transmission mechanism between cluster nodes is the core foundation for ensuring data consistency and system performance. With the rapid growth of data scale, the storage system has put forward higher requirements for the real-time performance of message transmission.

[0003] In the related art, a channel is used as the carrier of a message for message transmission. According to different message characteristics, a corresponding channel is allocated for message transmission, and the corresponding channel adopts a transmission protocol adapted to the message characteristics. However, the process of allocating channels is time-consuming, resulting in a high message transmission delay. Summary of the Invention

[0004] This application provides a message transmission method, apparatus, electronic device, medium, and product to at least solve the problem of high message transmission delay in the related art.

[0005] This application provides a message transmission method, including: receiving a message sending request, where the message sending request includes a message to be sent and a target node identifier; determining a target multiplexing channel through an idle reusable list according to the message sending request; mounting the message to be sent on the target multiplexing channel, and sending the message to be sent to a target node corresponding to the target node identifier through the target multiplexing channel.

[0006] 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 a target content.

[0007] This application also provides a message transmission apparatus, including: a first receiving module, configured to receive a message sending request, where the message sending request includes a message to be sent and a target node identifier; a determining module, configured to determine a target multiplexing channel through an idle reusable list according to the message sending request; a first sending module, configured to mount the message to be sent on the target multiplexing channel, and send the message to be sent to a target node corresponding to the target node identifier through the target multiplexing channel.

[0008] The present application also provides a message transmission device, including: a second receiving module, configured to receive a message to be processed sent by a sending node; a queue module, configured to determine a target receiving queue corresponding to the message to be processed and store the message to be processed into the target receiving queue; and a parsing module, configured to determine a target kernel corresponding to the target receiving queue, and parse and process the message to be processed through the target kernel to obtain target content.

[0009] The present application also provides an electronic device, including: a memory, configured to store a computer program; and a processor, configured to implement the steps of any one of the above message transmission methods when executing the computer program.

[0010] The present application also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the above message transmission methods are implemented.

[0011] The present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of any one of the above message transmission methods are implemented.

[0012] Through the present application, message transmission is performed through a multiplexed channel. Since there is no need to perform the operation of allocating a channel for a message to be sent through a channel pool, the problem of message transmission delay caused by channel allocation can be avoided. Therefore, the problem of high message transmission delay can be solved, and the technical effect of improving message transmission efficiency can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] To more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0014] Figure 1 A schematic diagram of an application scenario of a message transmission method provided by an embodiment of the present application;

[0015] Figure 2 A flowchart of a message transmission method provided by an embodiment of the present application;

[0016] Figure 3 A flowchart of a message transmission method provided by an embodiment of the present application;

[0017] Figure 4 A schematic diagram of channel multiplexing provided by an embodiment of the present application;

[0018] Figure 5 A schematic diagram of update processing provided by an embodiment of the present application;

[0019] Figure 6 Schematic diagram of message response provided by an embodiment of the present application;

[0020] Figure 7 Flow schematic diagram of a message transmission method provided by an embodiment of the present application;

[0021] Figure 8 Schematic diagram of a queue parallel scheme provided by an embodiment of the present application;

[0022] Figure 9 Schematic diagram of message response provided by an embodiment of the present application;

[0023] Figure 10 Schematic diagram of the structure of a message transmission device provided by an embodiment of the present application;

[0024] Figure 11 Schematic diagram of the structure of a message transmission device provided by an embodiment of the present application;

[0025] Figure 12 Schematic diagram of the structure of a message transmission device provided by an embodiment of the present application;

[0026] Figure 13 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0027] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present application.

[0028] It should be noted that in the description of the present application, the terms "including", "comprising" or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0029] 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 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. Moreover, the processing of relevant data, such as collection, use, processing, transmission, provision, disclosure, and application, complies with the relevant laws, regulations, and standards of relevant countries and regions, adopts necessary confidentiality measures, does not violate public order and good customs, and provides corresponding operation entrances for users to choose to authorize or refuse.

[0030] To enable those skilled in the art of this technical field to better understand the solution of this application, the following further elaborates on this application in combination with the accompanying drawings and specific implementation manners.

[0031] Combined with the specific application environment architecture or specific hardware architecture on which the execution of the message transmission method depends, the specific application environment architecture or specific hardware architecture is described herein. Refer to Figure 1 , Figure 1 FIG. is a schematic diagram of an application scenario of a message transmission method provided by an embodiment of this application. An example is given in combination with the illustrated scenario: In a distributed storage system, message transmission occurs between multiple distributed nodes to achieve goals such as data consistency, resource collaboration, or performance optimization among multiple distributed nodes.

[0032] Exemplarily, for any node that sends a message, message transmission is performed through a channel (Channel).

[0033] Among them, the logical or physical transmission channel for channel message transmission is the core carrier connecting the sending node and the receiving node. Specifically, the content or metadata of the message to be sent is written into the memory buffer pre-allocated by the channel. The underlying hardware driver is called to submit the message to be sent in the channel memory to the network device, and the message to be sent is sent to the receiving node through the network device.

[0034] In the related art, the sending node maintains a channel pool, which includes a group of channel resources, and the resources in the channel pool are allocated as needed. Each time the sending node sends a message, it allocates a channel from the channel pool and sends the message through the allocated channel. After the message is sent, the channel is recycled to the channel pool. The next time a message is sent, channel allocation needs to be performed again.

[0035] However, in the solution of the prior art, performing channel allocation before each message sending is time-consuming. It is necessary to complete channel allocation before message sending can be executed, resulting in a problem of high overall delay in sending messages.

[0036] The message transmission method provided by this application aims to solve the above technical problems of the prior art.

[0037] Figure 2 This is a schematic flowchart of the message transmission method provided by the embodiment of the present application. As Figure 2 shown, the embodiment of the present application provides a message transmission method, and the method is described in detail as follows:

[0038] S201. Receive a message sending request, where the message sending request includes the message to be sent and the target node identifier.

[0039] Among them, the execution entity of this embodiment is the sending node, that is, the node that sends messages to other nodes.

[0040] Exemplarily, the sending node may include at least one application module. Each application module is used to execute a specific function. During the process of the application module executing the function, the message to be sent is generated, and the application module generates a message sending request according to 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 to be sent in the message sending request.

[0041] Combined with the scenario example, by clearly 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.

[0042] S202. According to the message sending request, determine the target multiplexing channel through the idle reusable list.

[0043] Exemplarily, the target multiplexing channel is an idle channel stored in the memory of the sending node.

[0044] Exemplarily, in the present application, after each channel completes message sending, it is not recycled to the channel pool. When performing message sending next time, there is no need to perform channel allocation, but directly use the channel in the memory to perform message sending.

[0045] Combined with the scenario example, after allocating a channel through the channel pool, the channel is stored in the memory, and the channel is marked as the "active" state. Messages are sent through the channel in the "active" state. After completing message sending, the channel is marked as the "idle" state, and there is no need to recycle the channel to the channel pool. The channel in the "idle" state can be used to send other messages.

[0046] Optionally, the idle reusable list includes the location information of at least one idle channel. The location information is the storage location of the idle channel in the memory, and the idle channel can be accurately obtained through the location information.

[0047] 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.

[0048] Exemplarily, mounting refers to the process of binding the data content and / or protocol control information of the message to be sent to the pre-allocated buffer of the target multiplexing channel. The mounting process does not require data copying. It can be understood that since data copying is not performed, the overhead of the processor can be reduced.

[0049] Optionally, determine the network address of the target node, and store the network address of the target node in the static protocol header of the target multiplexing channel, so as to accurately send the message to be sent to the network address corresponding to the target node.

[0050] Optionally, the network device of the sending node (such as a network card or other device) reads data from the pre-allocated buffer, encapsulates it into a network data packet according to the format of the static protocol header, and sends it to the network address corresponding to the target node.

[0051] The message transmission method provided by the embodiments of the present application receives a message sending request, where the message sending request includes the message to be sent and the target node identifier; according to the message sending request, determines the target multiplexing channel through the idle reusable list; mounts the message to be sent to the target multiplexing channel, and sends the message to be sent to the target node corresponding to the target node identifier through the target multiplexing channel. In the above solution, message transmission is performed through a multiplexed channel. Since there is no need to perform the operation of allocating a channel for the message to be sent through the channel pool, the problem of message transmission delay caused by channel allocation can be avoided. Therefore, the problem of high message transmission delay can be solved, and the technical effect of improving message transmission efficiency can be achieved.

[0052] Based on any of the above embodiments, below, in combination with Figure 3 , the detailed process of message transmission will be described.

[0053] Figure 3 It is a schematic flowchart of a message transmission method provided by an embodiment of the present application. As Figure 3 shown, the method includes:

[0054] S301. Receive a message sending request, where the message sending request includes the message to be sent and the target node identifier.

[0055] It should be noted that the execution process of S301 refers to S201, which will not be elaborated here.

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

[0057] Exemplarily, each channel pointer corresponds to the location information of an idle and unreclaimed channel in the memory. Multiple candidate channels can be obtained from the memory according to the multiple channel pointers. Each candidate channel is an idle and unreclaimed channel.

[0058] Optionally, the channels are stored in a continuous memory block. Each channel is stored in a continuous memory block after being allocated from the channel pool. By using a continuous memory block, the extra overhead caused by cross-memory-block access when obtaining candidate channels can be avoided, thereby improving the efficiency of obtaining candidate channels.

[0059] Combined with the scenario example, through the channel pointer, the corresponding candidate channel can be directly obtained without dynamic addressing, and the candidate channel can be obtained quickly.

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

[0061] Optionally, each candidate channel may include at least one channel state.

[0062] Optionally, the channel state may include the historical error rate, load, available bandwidth, etc.

[0063] Combined with the scenario example, through the channel state, the candidate channels can be evaluated from multiple dimensions, and a more suitable channel can be selected according to the evaluation results for sending messages.

[0064] S304. Perform a sorting process on the multiple candidate channels according to the multiple channel states to obtain a channel sorting.

[0065] Optionally, the sorting process is performed according to a preset sorting strategy. The sorting strategy may include the type of channel state to be focused on, and the sorting process is performed according to the type of channel state to be focused on. For example, if the load is focused on, the multiple candidate channels are sorted according to the size of the load.

[0066] Optionally, the sorting strategy includes the weight of each channel state type, and the sorting process is performed according to the weight. For example, the channel state of each candidate channel includes the historical error rate and the load. The historical error rate and the 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.

[0067] Based on the above embodiments, the channel sorting obtained through the sorting process can reflect the priority order of the multiple candidate channels. Sending messages through the candidate channels with higher priority has higher data transmission performance, and sending messages through the candidate channels with lower priority has lower data transmission performance, so that the target multiplexing channel can be accurately determined.

[0068] S305. Determine the target multiplexing channel from the multiple candidate channels according to the channel sorting.

[0069] Optionally, the candidate channel with the highest sorting in the channel sorting is determined as the target multiplexing channel. The channel sorting reflects the priority of the multiple channels, and the channel with the highest sorting has a higher priority.

[0070] Combined with scenario examples, it shows that the comprehensive performance of the candidate channel with the highest ranking is better. Determining the candidate channel with better comprehensive performance as the target multiplexing channel can improve the performance of sending messages through the target multiplexing channel.

[0071] Optionally, determine the target multiplexing channel according to the message sending request.

[0072] Combined with scenario examples, each message sending request has different requirements for the channel. For core messages, a multiplexing channel with a higher priority is required to ensure the timeliness of message sending. For non-core messages, the requirements for the channel are lower. At this time, the multiplexing channel with the highest ranking can be allocated to core messages, and a multiplexing channel with a lower priority can be allocated to non-core messages to achieve overall planning and improve the overall data transmission performance of the sending node.

[0073] S306. Mount the message to be sent on 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.

[0074] A feasible implementation method. After sending the message to be sent, it may further include: performing a reset process on the target multiplexing channel to obtain a reset channel; performing an update process on the idle reusable list according to the reset channel to obtain an updated list, and the updated list is used for the multiplexing channel.

[0075] Optionally, the reset process includes but is not limited to processing such as deleting the message length, deleting the content of the temporary buffer, or deleting the network address.

[0076] Optionally, modify the channel state of the reset channel to "idle" so that the sending node can accurately determine whether the channel is available according to the channel state.

[0077] Exemplarily, determine the channel pointer of the reset channel, and add the channel pointer of the reset channel to the idle reusable list to obtain an updated list.

[0078] Combined with scenario examples, the multiplexing process of the channel may include: Message sending: Transmit the message to be sent through the selected target multiplexing channel. Channel state reset: After the message transmission is completed, release the resources and reset the parameters of the target multiplexing channel. Reset channel generation: Re-evaluate its availability according to the reset channel state. Idle list update: Dynamically refresh the idle reusable list of the system based on the evaluation result of the reset channel. Multiplexing decision: Use the updated list to perform the next channel selection to form a closed-loop management. It can be understood that through closed-loop management, the update cycle of the idle reusable list can be shortened to accurately respond to network changes. Through reset and multiplexing, the channel utilization rate can be improved.

[0079] Optionally, channel reset is used to ensure that the channel can quickly return to a reusable state after release, avoiding the impact of residual states on subsequent decisions. For the physical layer, the transmit power of the target multiplexed channel can be turned off to release the occupied spectrum resources. Clear the transmit / receive buffer associated with the target multiplexed channel to prevent interference from residual data packets. Reset the historical interference statistics of the target multiplexed channel. Reset the automatic repeat request counter and the hybrid automatic repeat request process to avoid the impact of historical retransmission records on subsequent reliability evaluations.

[0080] Optionally, the update process may include: adding reusable channels, adding the reset channels that pass the evaluation to the idle reusable list. Conflict avoidance, if there is strong interference between the reset channel and the currently used channel (such as excessive frequency overlap), then postpone the update until the interference is resolved. Remove invalid channels, delete the channels that enter the cooling period or are permanently disabled from the idle reusable list. Dynamic blacklist, automatically add channels that fail the evaluation three times in a row to the blacklist or recycle them to the channel pool. Priority adjustment, reorder and update according to the channel's historical performance (such as average throughput, stability, etc.).

[0081] Optionally, the reuse of the update list may include: real-time selection, when sending the next message, directly execute the sorting strategy based on the update list (such as sorting in descending order of priority). Load balancing, if the load of the highest priority channel > 60%, select the second-best channel with a load < 40% from the list to avoid congestion. Conflict prevention: After selecting a channel, perform interference cross-verification with the currently active channels to ensure no conflict before performing the transmission.

[0082] Optionally, immediately perform an update process on the target multiplexed channel after completing the message transmission to avoid using outdated channel information. Through the cooling period and blacklist mechanism, automatically isolate abnormal channels and reduce the need for manual intervention. Decouple the update process and reuse decision of the target multiplexed channel to ensure no service interruption during the handover process.

[0083] Next, Figure 4 channel multiplexing will be described.

[0084] Figure 4 is a schematic diagram of channel multiplexing provided by an embodiment of the present application. As Figure 4 shown, an active channel is allocated from the channel pool, and a message is sent through the active channel. After completing the message transmission, the active channel becomes an idle channel. The idle channel is not recycled to the channel pool. The idle reusable list is updated through the idle channel, and reusable channels can be quickly obtained through the idle reusable list. Sending messages through the reusable channels can avoid the transmission delay caused by channel allocation.

[0085] In this feasible implementation, by resetting the channel and updating the idle reusable list instead of reclaiming the channel, the transmission delay caused by reallocating the channel when the message sending request is executed next time after reclaiming the channel can be avoided, thereby improving the message transmission efficiency.

[0086] A feasible implementation can be updated through the following method to obtain an updated list, including: performing an exception verification process on the reset channel to obtain a first verification result, where 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 in the idle reusable list to obtain the updated list; if the first verification result is that the channel is abnormal, storing the reset channel in the channel pool, obtaining an idle channel from the channel pool, and storing the channel pointer of the idle channel in the idle reusable list to obtain the updated list.

[0087] Optionally, the exception verification process can be to verify whether the historical error rate of the reset channel meets the standard, verify whether the protocol of the reset channel is normal, or send a lightweight probe message and detect the response duration, etc. The first verification result is used to indicate whether the reset channel can be used. Specifically, physical layer metrics can be detected, such as whether the signal-to-noise ratio and / or bit error rate are normal. Interference residue can be detected, such as measuring whether the adjacent channel leakage power is normal. Hardware status detection can be performed, such as reading the radio frequency front-end status register and determining whether it is normal by judging whether the hardware fault flag bit is set.

[0088] Next, Figure 5 the update process will be described.

[0089] Figure 5 is a schematic diagram of the update process provided by the embodiment of the present application. As Figure 5 shown, for any reset channel, an exception verification process is performed on the reset channel, and the exception 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, and the idle 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, and the idle channel is used to update the idle reusable list instead of the reset channel.

[0090] Optionally, recycling the reset channel and reallocating the idle channel can be executed synchronously or step by step.

[0091] Exemplarily, during the process of recycling and resetting channels and reallocating idle channels, the reset channel has completed the message sending task. If a new message sending request is received during the process, other channels can be determined through the idle reusable list for message sending without affecting the execution of other message sending requests, thereby improving the message transmission efficiency.

[0092] In this feasible implementation manner, the exception verification and recycling mechanism can avoid directly reusing abnormal channels and affecting subsequent message transmission, thereby improving the reliability of message transmission.

[0093] A feasible implementation manner, the message transmission method further includes: determining a verification period, performing exception verification processing on the channels in the idle reusable list respectively according to the verification period to obtain a second verification result, where the second verification result is that the channel is abnormal or the channel is not abnormal; according to the second verification result, recycling the abnormal channels in the idle reusable list through the channel pool.

[0094] Exemplarily, the verification period is the period for verifying the idle reusable list, and automated verification can be achieved through the verification period.

[0095] Optionally, according to information such as the service requirements and load of the sending node, dynamically adjust an appropriate verification period.

[0096] Combined with the scenario example, over time, normal channels may become abnormal due to external or internal reasons. Regular verification can timely detect abnormal channels and perform recycling processing on the abnormal channels.

[0097] Optionally, after recycling the abnormal channels, allocate normal channels from the channel pool and update the idle reusable list with the normal channels to ensure that there are sufficient idle channels for reuse and avoid the problem of low transmission efficiency caused by allocating channels only when they are needed.

[0098] In this feasible implementation manner, by regularly verifying channels, abnormal channels can be timely recycled, and the subsequent message sending can be prevented from being affected by abnormal channels, thereby improving the reliability of message transmission.

[0099] A feasible implementation manner, the message transmission method further includes: determining the target channel identifier of the target reusable channel; determining the first correspondence between the channel identifier and the port resource identifier; according to the target channel identifier and the first correspondence, determining the target port resource identifier, and determining the target port resource according to the target port resource identifier; storing the message to be sent in the target port resource.

[0100] Among them, the port resource is a resource pool used by the sending node to temporarily store messages to be sent. When a message sending exception occurs, the message to be sent stored in the resource pool can be used to resend the message to improve the reliability of message transmission.

[0101] In the related art, the number of channels is different from the number of port resources, and there is no corresponding relationship between the channels and the port resources. In the related art, the target port resource is determined by traversing the port resource list, and the traversal process takes time, resulting in the problem of low message transmission efficiency.

[0102] Exemplarily, the target channel identifier is the unique identifier of the target multiplexing channel, which is used to accurately locate the target multiplexing channel.

[0103] Optionally, the target channel identifier can be statically allocated: generate an identifier according to a predefined rule, for example, combine the channel frequency band, bandwidth, or time slot number to obtain the target channel identifier. The target channel identifier can be dynamically generated: when the target multiplexing channel is created, the system or the channel pool automatically allocates a unique identifier to ensure global uniqueness.

[0104] Optionally, in the present application, there is a one-to-one correspondence between the channel identifier and the port resource identifier.

[0105] Optionally, 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 maintenance method of the mapping table can be static configuration: when the system is initialized, the corresponding relationship between the channel and the port is defined through a configuration file (for example: the channel ID "CH_001" is mapped to the port ID "RF_PORT_1"). The maintenance method of the mapping table can be dynamic binding: adjust the mapping relationship in real time according to the network state. For example, when a certain port resource has a high load, the channel is dynamically bound to the standby port resource.

[0106] Optionally, the mapping relationship is stored in the memory or the database in the form of key-value pairs, which supports fast query and update.

[0107] Optionally, each port resource is associated with an independent sending buffer for temporarily storing messages to be sent. The sending buffer usually divides the queue according to the priority (for example: the high-priority queue stores emergency control instructions, and the ordinary queue stores data streams). According to the protocol supported by the port resource, the message to be sent is encapsulated into a standardized data packet. Select the sending queue with the corresponding priority according to the service type of the message. Call the port driver interface to write the data packet into the buffer and wait for the hardware or the protocol stack to schedule the sending.

[0108] Optionally, if a hardware failure of the port resource or a continuous high packet loss rate is detected, the port resource is automatically marked as "unavailable", and the mapping table is updated to switch the original bound channel to the standby port resource. When the network topology changes or the service requirements are adjusted, the binding relationship between the channel and the port resource is dynamically updated through the control plane protocol. If the buffer is close to full, a flow control mechanism (such as pausing writing or discarding low-priority data) is triggered to ensure that high-priority services are not affected.

[0109] Combined with the scenario example, it shows that after determining the target multiplexing channel through the first correspondence relationship, the target port resource can be quickly determined.

[0110] In this feasible implementation method, through the first correspondence relationship, the target port resource can be quickly determined, thereby improving the efficiency of message transmission. End-to-end directional transmission is achieved through the unique identifier and the mapping table to avoid data mistransmission. The independent port resource and buffer design ensure that different services do not interfere with each other. It supports dynamic binding and mapping adjustment to adapt to network expansion or reconstruction. The anomaly detection and automatic switching mechanism guarantee the continuity of transmission.

[0111] A feasible implementation method can store the message to be sent into the target resource port through the following method: determine the unsent messages of the sending node, and determine the transmission load according to the unsent messages; judge whether to perform message aggregation processing according to the transmission load; if so, perform message aggregation processing on the unsent messages and the message to be sent to obtain the first aggregated message, and store the first aggregated message into the target port resource; if not, store the message to be sent into the target port resource.

[0112] Among them, message aggregation means aggregating multiple messages to be sent to the port resource for unified transmission, and the multiple messages can come from different application modules.

[0113] Exemplarily, the sending node includes a window layer and a communication layer.

[0114] In the related technology, for any scenario, message aggregation is performed at the window layer, and the aggregated message is sent to the communication layer, and the communication layer sends the aggregated message to the receiving node, which may cause the problem of excessive load pressure on message sending.

[0115] Exemplarily, on the one hand, message aggregation can improve the utilization rate of communication resources, and on the other hand, sending multiple messages at one time will increase the transmission load.

[0116] Optionally, determine the current transmission load of the sending node according to the number and size of the unsent messages of the sending node.

[0117] Exemplarily, if the transmission load is greater than or equal to a preset value, no message aggregation processing is performed, and only the message to be sent is sent. If the transmission load is less than the preset value, message aggregation processing is performed, and the aggregated first aggregated message is sent.

[0118] Combined with the scenario example, in a scenario with a high transmission load, no message aggregation is performed, which can simplify the processing flow and reduce the delay caused by the transmission load. In a scenario with a low transmission load, message aggregation can maximize the utilization of communication resources. Under low transmission load pressure, sending message aggregation can maximize the utilization of communication resources, that is, multiple messages can be transmitted in one request, regardless of which application module the messages come from. However, when the transmission load pressure is large enough, message aggregation for sending needs to be trimmed, reducing message aggregation, which can simplify the processing flow and improve the message sending efficiency. It is up to the application module itself to decide whether to aggregate messages. Large messages can be directly transmitted to the window layer individually. When the small messages have low latency requirements, they can be aggregated into a large message and transmitted to the window layer. For the window layer and the communication layer, when receiving the messages transmitted by the application module, they directly match the port resources and are transmitted to the other node by the channel, without considering the aggregation action, thus improving the message sending efficiency.

[0119] In this feasible implementation, by flexibly performing message aggregation processing, while avoiding the excessive transmission load from affecting message transmission, the communication resources are maximally utilized.

[0120] A feasible implementation can perform message aggregation processing through the following method, including: determining the aggregation margin according to the transmission load; performing message aggregation processing on the unsent messages and the messages to be sent according to the aggregation margin to obtain the first aggregated message.

[0121] Exemplarily, the aggregation margin determined according to the transmission load can ensure that after message aggregation processing, it will not exceed the preset value of the transmission load.

[0122] Combined with the scenario example, the aggregation margin indicates how many unsent messages can be subjected to message aggregation processing.

[0123] In this feasible implementation, by determining the aggregation margin, it can be clear how many messages are to be subjected to message aggregation processing, thereby improving the accuracy of message aggregation processing.

[0124] A feasible implementation method can also perform message aggregation processing and store the message to be sent into the target port resource through the following method, including: determining the message type of the message to be sent from the message header of the message to be sent, where 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 into 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 into the target port resource.

[0125] Exemplarily, messages of the real-time stream type have high requirements for latency and need to be sent quickly, such as messages for video calls. Messages of the batch data type have lower requirements for latency, such as log files or offline tasks.

[0126] Combined with the scenario example, for real-time stream messages with high latency requirements, directly sending without aggregation processing can avoid increasing latency by waiting for aggregation and ensure transmission real-time. For messages of the batch data type with lower latency requirements, aggregation processing can maximize the utilization of communication resources and reduce the number of transmissions.

[0127] In this feasible implementation method, through flexible aggregation processing, it is possible to determine whether to perform message aggregation according to the actual scenario, avoid message aggregation from affecting the normal sending of messages, and improve message transmission efficiency.

[0128] A feasible implementation method, the message transmission method further includes: receiving the acknowledgment sequence number sent by the target node, and asynchronously storing the acknowledgment sequence number into the acknowledgment processing queue of the sending node; performing message acknowledgment processing according to the acknowledgment sequence number in the acknowledgment processing queue.

[0129] Among them, the acknowledgment processing is that after receiving the message, the receiving node sends an acknowledgment indication to the sending node to indicate that the receiving node has received the message, and the sending node destroys the corresponding message according to the acknowledgment indication.

[0130] Exemplarily, in the response phase, after the receiving node finishes receiving, the receiving node feeds back the sequence number of the received message queue to the sending node. The feedback sequence number can be transmitted in two ways: the receiving node issues a protocol command for a read request, obtains the local sequence number, and writes it into the command description block byte of the protocol command; when the sending node sends a message back, it obtains the local sequence number and writes it into the command description block byte of the protocol command. When the protocol command carrying the feedback sequence number reaches the message sending node and is received by the communication layer of the sending node, it will asynchronously transmit the kernel where the sent message is located for response operations. The response operations may include: comparing the feedback sequence number with the linked list of the sent message queue (including the sent but un-reclaimed messages), if the sequence number of any message in the linked list is smaller than the feedback sequence number, then it is removed from the linked list, and the business module serially reclaims and destroys the message, and compares and processes the messages in the linked list one by one until the condition is not met. Since the response phase is a part of the message transmission process, it takes a certain amount of time in the message transmission process. This causes a delay in the start time of the idle waiting of the sending end channel and delays the parsing and forwarding of the message content at the receiving end.

[0131] In the related art, after the sending node receives the response indication, it determines the corresponding message according to the response indication. Until the corresponding message is destroyed, the channel changes to the idle state, resulting in a relatively long idle waiting duration of the channel, and thus resulting in the problem of low message transmission efficiency.

[0132] Exemplarily, the response sequence number is the sequence number corresponding to the message.

[0133] Optionally, there is a one-to-one correspondence between the message and the sequence number, and the corresponding message can be accurately determined through the sequence number.

[0134] Exemplarily, by asynchronously storing the response sequence number and performing response processing, the channel does not need to wait for the response to complete.

[0135] In this feasible implementation, through asynchronous response processing, the response can be decoupled from the message transmission, avoiding the process of waiting for the response from affecting the message transmission, thereby improving the efficiency of message transmission.

[0136] A feasible implementation can perform message response processing through the following method, including: determining a message queue, where the sent messages are stored in the message queue; determining at least one message to be destroyed from the message queue according to the response sequence number, and the sequence numbers of the at least one message to be destroyed are all less than or equal to the response sequence number; performing asynchronous destruction processing on the at least one message to be destroyed to implement message response processing.

[0137] Next, in combination with Figure 6 the message response will be described.

[0138] Figure 6 This is a schematic diagram of the message response provided by the embodiment of the present application. As Figure 6As shown, each message in the message queue has a corresponding sequence number. According to the response sequence number 004, the messages in the message queue with sequence numbers less than or equal to 004 are extracted as the messages to be destroyed. The messages to be destroyed are processed for destruction.

[0139] Exemplarily, through asynchronous destruction processing, message destruction and message transmission can be performed simultaneously, thereby improving the message transmission efficiency.

[0140] In this feasible implementation manner, at least one message to be destroyed can be quickly determined from the message queue through a response sequence number, thereby improving the message response efficiency.

[0141] A feasible implementation manner, the message transmission method further includes: removing at least one message to be destroyed from the target port resource.

[0142] Combined with the scenario example, after completing the message response, it indicates that the receiving node has received the message, and the message transmission task is completed. Removing the message to be destroyed from the target port resource can avoid the message to be destroyed that does not need to be used continuously from occupying the target port resource.

[0143] In this feasible implementation manner, by removing at least one message to be destroyed from the target port resource, the target port resource can normally process subsequent message transmissions, thereby improving the reliability of message transmission.

[0144] Figure 7 It is a schematic flowchart of the message transmission method provided by the embodiment of the present application. As Figure 7 shown, the embodiment of the present application provides a message transmission method, and the method is described in detail as follows:

[0145] S701. Receive the message to be processed sent by the sending node.

[0146] Among them, the execution subject of this embodiment is the receiving node.

[0147] Exemplarily, the message to be processed is a message that the sending node instructs the receiving node to process.

[0148] Exemplarily, the receiving node may include at least one application module, and each application module is used to process the message content in the specified message, and the message content is obtained through parsing to implement a specific function.

[0149] 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.

[0150] In the related art, the messages received by the receiving node are stored in a unified queue, and the messages in the queue are processed in sequence according to the order of the messages in the queue. The subsequent messages in the queue need to wait in line. When there are many messages in the queue, the waiting time will cause the problem of low message processing efficiency.

[0151] Exemplarily, the receiving node of the present application sets multiple queues, and the target receiving queue is the queue corresponding to the message to be processed.

[0152] Exemplarily, the multiple queues are processed in parallel, and the multiple queues do not interfere with each other, thereby improving the message processing efficiency.

[0153] A feasible implementation manner may determine the target receiving queue through the following method, including: determining the target module identifier in the message header of the message to be processed; determining the second correspondence between the module identifier and the receiving queue; and determining the target receiving queue according to the target module identifier and the second correspondence.

[0154] Exemplarily, the module identifier is the unique identifier of the module. Through the target module identifier, the uniquely corresponding target application module can be accurately determined. The target application module is the application module that the sending node indicates to process the message in the message header.

[0155] Optionally, the second correspondence represents the one-to-one correspondence between the application module and the receiving queue.

[0156] Next, in conjunction with Figure 8 the queue parallel scheme will be described.

[0157] Figure 8 This is a schematic diagram of the queue parallel scheme provided by the embodiment of the present application. As Figure 8 shown, each application module corresponds to a receiving queue, and each application module is used to process the messages in the corresponding receiving queue. Multiple application modules process multiple receiving queues in parallel, and different application modules do not interfere with each other. Processing multiple receiving queues in parallel can effectively improve the message processing efficiency compared with processing one receiving queue.

[0158] In this feasible implementation manner, through the second correspondence, the target receiving queue can be quickly determined and the message to be processed can be allocated to the target receiving queue, thereby improving the message processing efficiency.

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

[0160] Among them, the target content is the content that specifically needs to be processed by the application module in the message to be processed.

[0161] Exemplarily, the target kernel is a kernel dedicated to parsing the messages in the target receiving queue.

[0162] Optionally, a kernel is allocated to each receiving queue in advance.

[0163] A feasible implementation manner, the message transmission method further includes: determining a module to be allocated and the module identifier of the module to be allocated; determining an idle kernel from the receiving nodes; establishing an idle queue corresponding to the idle kernel; and updating the second corresponding relationship according to the module identifier of the module to be allocated and the idle queue.

[0164] Wherein, the kernel provides computing resources, and the messages are processed through the computing resources provided by the kernel. The idle kernel is a kernel that is not currently allocated to any queue.

[0165] Exemplarily, the module to be allocated is an application module not included in the second corresponding relationship, and the idle kernel is a kernel not included in the second corresponding relationship.

[0166] Exemplarily, for the scenario of adding an application module to the receiving node, a queue and a kernel are allocated to the added application module, and the second corresponding relationship is updated. Subsequently, the messages related to the added application module are processed by the queue and the kernel corresponding to the added application module.

[0167] Combined with the scenario example, each queue is bound to a dedicated kernel, and the messages in the corresponding queue are processed by the dedicated kernel.

[0168] In this feasible implementation manner, through the kernels corresponding to each queue respectively, dedicated kernel for dedicated use can be achieved. Compared with one kernel processing multiple queues, the message processing efficiency can be effectively improved.

[0169] A feasible implementation manner, the message transmission method further includes: determining multiple candidate sequence numbers corresponding to multiple messages in the target receiving queue; determining a target sequence number according to the multiple candidate sequence numbers, where 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.

[0170] Exemplarily, by sending the target sequence number, the receiving node can perform an acknowledgment process on the sending node.

[0171] Combined with the scenario example, the receiving node can receive multiple messages, and the multiple messages correspond to multiple sequence numbers. For example, the multiple sequence numbers include 001, 002, 003, and 004, and the largest sequence number among the multiple sequence numbers, i.e., 004, represents the multiple sequence numbers. By using the sequence number 004 to represent multiple sequence numbers less than or equal to 004, the sending node can clearly know that the receiving node has received the messages with multiple sequence numbers less than or equal to 004 according to the sequence number 004.

[0172] Next, Figure 9 the message acknowledgment will be described.

[0173] Figure 9 This is a schematic diagram of message response provided by an embodiment of the present application. As Figure 9 shown, the sending node receives the message to be sent, and the sending node 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 according to the target sequence number.

[0174] In this feasible implementation manner, by selecting the target sequence number from multiple candidate sequence numbers and sending it to the sending node, compared with sending multiple candidate sequence numbers, the communication resource overhead can be reduced and the message transmission efficiency can be improved.

[0175] A feasible implementation manner, the message transmission method further includes: determining the number of messages to be parsed in the target receiving queue and the 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 corresponding relationship between the target receiving queue and the new kernel, and the new kernel is used to parse and process the messages in the target receiving queue.

[0176] Exemplarily, if the number of messages to be parsed is greater than or equal to the quantity threshold, it indicates that the processing pressure on the kernel corresponding to the target receiving queue is relatively large. The new kernel is used to relieve the processing pressure on the target receiving queue, and the parsing efficiency is improved by the new kernel.

[0177] Combined with the scenario example, the messages in the target receiving queue correspond to an application module. When there are more messages corresponding to the application module, storing the messages in the target receiving queue will cause an increase in the processing pressure on the corresponding kernel, and it is impossible to process multiple messages in the target receiving queue in time. By adding a new kernel to cooperate with the existing kernel, the messages in the target receiving queue can be processed and completed earlier.

[0178] In this feasible implementation manner, flexibly increasing the kernel according to the number of messages in the target receiving queue can ensure that the messages in the target receiving queue are processed and completed in time, thereby improving the message processing efficiency.

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

[0180] Figure 10 This is a schematic structural diagram of a message transmission device provided by an embodiment of the present application. As Figure 10 shown, an embodiment of the present application further provides a message transmission device. The message transmission device 100 may include: a first receiving module 101, a determining module 102, and a first sending module 103, where

[0181] The first receiving module 101 is configured to receive a message sending request, where the message sending request includes a message to be sent and a target node identifier.

[0182] The determining module 102 is configured to determine a target multiplexing channel according to the message sending request through an idle reusable list.

[0183] The first sending module 103 is configured to mount the message to be sent on 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.

[0184] Optionally, the first receiving module 101 may execute Figure 2 S201 in the embodiment.

[0185] Optionally, the determining module 102 may execute Figure 2 S202 in the embodiment.

[0186] Optionally, the first sending module 103 may execute Figure 2 S203 in the embodiment.

[0187] It should be noted that the message transmission device shown in the embodiment of the present application may execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be elaborated here.

[0188] In a possible implementation manner, the determining module 102 is specifically configured to:

[0189] Determine a plurality of candidate channels from the memory through a plurality of channel pointers stored in the idle reusable list;

[0190] Determine a plurality of channel states corresponding to the plurality of candidate channels;

[0191] Perform a sorting process on the plurality of candidate channels according to the plurality of channel states to obtain a channel sorting;

[0192] Determine a target multiplexing channel from the plurality of candidate channels according to the channel sorting.

[0193] Figure 11 This is a schematic structural diagram of a message transmission device provided by an embodiment of the present application. Based on the Figure 10 shown embodiment, as Figure 11 shown, 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, where

[0194] The reset module 104 is configured to:

[0195] Reset the target reusable channel to obtain a reset channel;

[0196] Update the idle reusable list according to the reset channel to obtain an updated list, and the updated list is used for the reusable channel.

[0197] In a possible implementation manner, the reset module 104 is specifically used for:

[0198] Perform an exception verification process on the reset channel to obtain a first verification result, where the first verification result is that the channel is abnormal or the channel is not abnormal;

[0199] If the first verification result is that the channel is not abnormal, store the channel pointer of the reset channel into the idle reusable list to obtain an updated list;

[0200] If the first verification result is that the channel is abnormal, store the reset channel into the channel pool, obtain an idle channel from the channel pool, and store the channel pointer of the idle channel into the idle reusable list to obtain an updated list.

[0201] The recycling module 105 is used for:

[0202] Determine a verification period, and perform an exception verification process on the channels in the idle reusable list according to the verification period to obtain a second verification result, where the second verification result is that the channel is abnormal or the channel is not abnormal;

[0203] According to the second verification result, recycle the abnormal channels in the idle reusable list through the channel pool.

[0204] The storage module 106 is used for:

[0205] Determine the target channel identifier of the target reusable channel;

[0206] Determine the first correspondence between the channel identifier and the port resource identifier;

[0207] According to the target channel identifier and the first correspondence, determine the target port resource identifier, and determine the target port resource according to the target port resource identifier;

[0208] Store the message to be sent into the target port resource.

[0209] In a possible implementation manner, the storage module 106 is specifically used for:

[0210] Determine the unsent messages of the sending node, and determine the transmission load according to the unsent messages;

[0211] Judge whether to perform message aggregation processing according to the transmission load;

[0212] If so, perform message aggregation processing on the unsent messages and the messages to be sent to obtain a first aggregated message, and store the first aggregated message in the target port resource;

[0213] If not, store the messages to be sent in the target port resource.

[0214] In a possible implementation manner, the storage module 106 is specifically configured to:

[0215] Determine an aggregation margin according to the transmission load;

[0216] Perform message aggregation processing on the unsent messages and the messages to be sent according to the aggregation margin to obtain a first aggregated message.

[0217] In a possible implementation manner, the storage module 106 is specifically configured to:

[0218] Determine the message type of the messages to be sent from the message header of the messages to be sent, and the message type is real-time stream or batch data;

[0219] If the message type of the messages to be sent is real-time stream, store the messages to be sent in the target port resource;

[0220] If the message type of the messages to be sent is batch messages, perform message aggregation processing on the unsent messages and the messages to be sent to obtain a second aggregated message, and store the second aggregated message in the target port resource.

[0221] The response module 107 is configured to:

[0222] Receive the response sequence number sent by the target node, and asynchronously store the response sequence number in the response processing queue of the sending node;

[0223] Perform message response processing according to the response sequence numbers in the response processing queue.

[0224] In a possible implementation manner, the response module 107 is specifically configured to:

[0225] Determine a message queue, and the message queue stores the sent messages;

[0226] Determine at least one message to be destroyed from the message queue according to the response sequence number, and the sequence numbers of the at least one message to be destroyed are all less than or equal to the response sequence number;

[0227] Asynchronously destroy the at least one message to be destroyed to implement message response processing.

[0228] The destruction module 108 is configured to:

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

[0230] Figure 12 This is a schematic structural diagram of the message transmission device provided by the embodiment of the present application. As Figure 12 shown, the embodiment of the present application also provides a message transmission device. The message transmission device 120 may include: a second receiving module 121, a queue module 122, a parsing module 123, an updating module 124, a second sending module 125, and a new adding module 126. Among them,

[0231] The second receiving module 121 is configured to receive a message to be processed sent by a sending node.

[0232] The queue module 122 is configured to determine a target receiving queue corresponding to the message to be processed, and store the message to be processed into the target receiving queue.

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

[0234] Optionally, the second receiving module 121 may execute Figure 7 S701 in the embodiment.

[0235] Optionally, the queue module 122 may execute Figure 7 S702 in the embodiment.

[0236] Optionally, the parsing module 123 may execute Figure 7 S703 in the embodiment.

[0237] In a possible implementation manner, the queue module 122 is specifically configured to:

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

[0239] Determine a second corresponding relationship between the module identifier and the receiving queue;

[0240] Determine the target receiving queue according to the target module identifier and the second corresponding relationship.

[0241] The updating module 124 is configured to:

[0242] Determine a module to be allocated and the module identifier of the module to be allocated;

[0243] Determine an idle kernel from the receiving nodes;

[0244] Establish an idle queue corresponding to the idle kernel;

[0245] Update the second corresponding relationship according to the module identifier of the module to be allocated and the idle queue.

[0246] The second sending module 125 is configured to:

[0247] Determine multiple candidate sequence numbers corresponding to multiple messages in the target receiving queue;

[0248] Determine a target sequence number according to the multiple candidate sequence numbers, where the target sequence number is greater than any other sequence number among the multiple candidate sequence numbers;

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

[0250] Add a new module 126 for:

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

[0252] If the number of messages to be parsed is greater than or equal to the quantity threshold, determine a new kernel from the idle kernel pool and establish a third corresponding relationship between the target receiving queue and the new kernel, where the new kernel is used to parse and process the messages in the target receiving queue.

[0253] For the description of the features in the embodiment corresponding to the message transmission device, reference can be made to the relevant description in the embodiment corresponding to the message transmission method, which will not be elaborated here one by one.

[0254] Figure 13 This is a schematic structural diagram of the electronic device provided by the present application. As Figure 13 shown, 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. Among them, the processor 1301, the memory 1302, and the communication component 1303 are connected through a bus.

[0255] In a specific implementation process, at least one processor 1301 executes the computer execution instructions stored in the memory 1302, so that at least one processor 1301 executes the above message transmission method embodiment.

[0256] For the specific implementation process of the processor 1301, reference can be made to the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here in this embodiment.

[0257] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the application can be directly implemented by the execution of the hardware processor, or can be implemented by the combination of the hardware and software modules in the processor.

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

[0259] The bus may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, the buses in the drawings of this application are not limited to only one bus or one type of bus.

[0260] The embodiments of the present application also provide a computer-readable storage medium, in which a computer program is stored. Among them, the computer program is set to execute the steps in any of the above message transmission method embodiments when running.

[0261] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs, etc., various media that can store computer programs.

[0262] The embodiments of the present application also provide a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any of the above message transmission method embodiments are implemented.

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

[0264] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0265] The above has introduced in detail a message transmission method, apparatus, electronic device, medium, and product provided by the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A message transmission method, applied to a sending node, characterized in that: include: receiving a message sending request, wherein the message sending request includes a message to be sent and a target node identifier; According to the message sending request, determining a target multiplexing channel through an idle multiplexing list; the target multiplexing channel is an idle channel stored in the memory of the sending node; Mounting the message to be sent to the target multiplexing channel, and sending the message to be sent to the target node corresponding to the target node identifier through the target multiplexing channel; Resetting the target multiplexing channel to obtain a reset channel; The idle multiplexable list is updated according to the reset channel to obtain an updated list, and the updated list is used for multiplexing channels.

2. The message transmission method according to claim 1, characterized in that: The target multiplexing channel is determined through the idle multiplexing list, including: Determine multiple channels to be selected from the memory through multiple channel pointers stored in the idle reusable list; Determine a plurality of channel states corresponding to the plurality of channels to be selected; Sorting the multiple channels to be selected according to the multiple channel states to obtain a channel sorting; According to the channel ranking, the target multiplexing channel is determined from the multiple channels to be selected.

3. The message transmission method according to claim 1 or 2, characterized in that: The idle reusable list is updated according to the reset channel to obtain an updated list, including: Performing abnormality verification processing on the reset channel to obtain a first verification result, where 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 updated list; If the first verification result is that the channel is abnormal, the reset channel is stored in a channel pool, and an idle channel is obtained from the channel pool, and the channel pointer of the idle channel is stored in the idle reusable list to obtain the updated list.

4. The message transmission method according to claim 3, characterized in that: The method further comprises: Determine a verification cycle, and perform abnormal verification processing on the channels in the idle reusable list according to the verification cycle to obtain a second verification result, where the second verification result is that the channel is abnormal or the channel is not abnormal; According to the second verification result, the abnormal channels in the idle reusable list are recycled through the channel pool.

5. The message transmission method according to claim 1 or 2, characterized in that: The method further comprises: Determining a target channel identifier of the target multiplexed channel; Determine a first corresponding relationship between a channel identifier and a port resource identifier; Determine a target port resource identifier according to the target channel identifier and the first corresponding relationship, and determine a target port resource according to the target port resource identifier; The message to be sent is stored in the target port resource.

6. The message transmission method according to claim 5, characterized in that: Storing the message to be sent in the target port resource includes: Determining unsent messages of a sending node, and determining a transmission load according to the unsent messages; Determining whether to perform message aggregation processing according to the transmission load; If yes, performing message aggregation processing on the unsent message and the to-be-sent message to obtain a first aggregate message, and storing the first aggregate message in the target port resource; If not, the message to be sent is stored in the target port resource.

7. The message transmission method according to claim 6, characterized in that: The unsent message and the to-be-sent message are aggregated to obtain a first aggregated message, including: determining an aggregation margin according to the transmission load; According to the aggregation margin, message aggregation processing is performed on the unsent message and the to-be-sent message to obtain the first aggregate message.

8. The message transmission method according to claim 5, characterized in that: Storing the message to be sent in the target port resource includes: Determine a message type of the message to be sent from a message header of the message to be sent, the message type being a real-time stream or batch data; If the message type of the message to be sent is a real-time stream, storing the message to be sent in the target port resource; If the message type of the to-be-sent message is a batch message, message aggregation processing is performed on the unsent message and the to-be-sent message to obtain a second aggregate message, and the second aggregate message is stored in the target port resource.

9. The message transmission method according to claim 1, characterized in that: The method further comprises: Receiving a response sequence number sent by the target node, and asynchronously storing the response sequence number in a response processing queue of the sending node; Message response processing is performed according to the response sequence number in the response processing queue.

10. The message transmission method according to claim 9, characterized in that: Performing message response processing according to the response sequence number in the response processing queue includes: Determine a message queue, wherein the message queue stores sent messages; According to the response sequence number, determining at least one message to be destroyed 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; Asynchronous destruction processing is performed on the at least one message to be destroyed to implement message response processing.

11. The message transmission method according to claim 10, characterized in that: The method further comprises: The at least one message to be destroyed is removed from the target port resource.

12. A message transmission method, characterized in that: include: Receive the pending message sent by the sending node; The message to be processed is sent through a target multiplexing channel, and the target multiplexing channel is an idle channel determined by an idle multiplexing list and stored in a memory of the sending node; the sending node is used to reset the target multiplexing channel after sending the message to be processed to obtain a reset channel, and update the idle multiplexing list according to the reset channel to obtain an updated list, and the updated list is used for the multiplexing channel; Determine a target receiving queue corresponding to the to-be-processed message, and store the to-be-processed message in the target receiving queue; A target kernel corresponding to the target receiving queue is determined, and the to-be-processed message is parsed and processed by the target kernel to obtain target content.

13. The message transmission method according to claim 12, characterized in that: Determining a target receiving queue corresponding to the to-be-processed message includes: Determine the target module identifier in the message header of the message to be processed; Determine a second corresponding relationship between the module identifier and the receiving queue; The target receiving queue is determined according to the target module identifier and the second corresponding relationship.

14. The message transmission method according to claim 12 or 13, characterized in that: The method further comprises: Determine the module to be allocated and the module identifier of the module to be allocated; Determine the idle cores from the receiving node; Establishing an idle queue corresponding to the idle core; The second corresponding relationship is updated according to the module identifier of the module to be allocated and the idle queue.

15. The message transmission method according to claim 12, characterized in that: The method further comprises: Determine a plurality of sequence numbers to be selected corresponding to a plurality of messages in the target receiving queue; Determine a target sequence number according to the plurality of sequence numbers to be selected, the target sequence number being greater than any other sequence number among the plurality of sequence numbers to be selected; The target sequence number is sent to the sending node.

16. The message transmission method according to claim 12, characterized in that: The method further comprises: 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 corresponding relationship between the target receiving queue and the new kernel is established. The new kernel is used to parse the messages in the target receiving queue.

17. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the message transmission method according to any one of claims 1 to 16 when executing the computer program.

18. 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 according to any one of claims 1 to 16.

19. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the message transmission method according to any one of claims 1 to 16 are implemented.

Citation Information

Patent Citations

  • Message transmission method, message forwarding equipment and storage medium

    CN110365802A

  • Real-time communication method based on unified communication channel and related equipment

    CN114827065A