Message transmission method and device, electronic equipment, medium and product

By using an idle multiplexable list in a distributed storage system to determine the target multiplexed channel, directly mount and transmit the message, the problem of high message transmission delay is solved and more efficient message transmission is achieved.

CN119892770AActive Publication Date: 2025-04-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In distributed storage systems, the message transmission delay between cluster nodes is high, mainly because the process of allocating channels takes a long time.

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 process of channel allocation.

Benefits of technology

The message transmission delay is reduced, the message transmission efficiency is improved, and the problem of high delay caused by channel allocation in the prior art is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892770A_ABST
    Figure CN119892770A_ABST
Patent Text Reader

Abstract

The invention discloses a message transmission method and device, electronic equipment, a medium and a product, and relates to the technical field of communication, message transmission is carried out through a multiplexed channel, the problem of message transmission delay caused by channel allocation can be avoided due to the fact that the operation of allocating a channel for a to-be-sent message through a channel pool does not need to be executed, and therefore the message transmission time delay can be effectively reduced. The problem of high message transmission delay can be solved, and the technical effect of improving the message transmission efficiency is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a message transmission method, device, 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 a carrier of a message to transmit a message. According to different message characteristics, a corresponding channel is allocated to the message for message transmission. The corresponding channel adopts a transmission protocol that adapts to the message characteristics. However, the process of allocating channels is time-consuming, resulting in a high delay in message transmission. Summary of the invention

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

[0005] The present application provides a message transmission method, including: receiving a message sending request, the message sending request including a message to be sent and a target node identifier; determining a target multiplexing channel through an idle multiplexable list according to the message sending request; 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.

[0006] The present application provides a message transmission method, including: receiving a to-be-processed message sent by a sending node; determining a target receiving queue corresponding to the to-be-processed message, and storing the to-be-processed message in the target receiving queue; determining a target kernel corresponding to the target receiving queue, parsing and processing the to-be-processed message through the target kernel, and obtaining a target content.

[0007] The present application also provides a message transmission device, including: a first receiving module, used to receive a message sending request, the message sending request includes a message to be sent and a target node identifier; a determination module, used to determine a target multiplexing channel through an idle multiplexable list according to the message sending request; a first sending module, used to 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.

[0008] The present application also provides a message transmission device, including: a second receiving module, used to receive a message to be processed sent by a sending node; a queue module, used to determine a target receiving queue corresponding to the message to be processed, and store the message to be processed in the target receiving queue; a parsing module, used 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 the target content.

[0009] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any one of the above-mentioned 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, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned message transmission methods are implemented.

[0011] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned message transmission methods when executed by a processor.

[0012] Through the present application, messages are transmitted through multiplexed channels. Since there is no need to perform the operation of allocating channels for messages to be sent through a channel pool, the message transmission delay problem 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. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

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

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

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

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

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

[0019] Figure 6 A schematic diagram of a message response provided in an embodiment of the present application;

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

[0021] Figure 8 A schematic diagram of a queue parallel solution provided in an embodiment of the present application;

[0022] Fig. 9 A schematic diagram of a message response provided in an embodiment of the present application;

[0023] Fig.10 A schematic diagram of the structure of a message transmission device provided in an embodiment of the present application;

[0024] Fig.11 A schematic diagram of the structure of a message transmission device provided in an embodiment of the present application;

[0025] Fig.12 A schematic diagram of the structure of a message transmission device provided in an embodiment of the present application;

[0026] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0028] It should be noted that, in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. 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.

[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 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, and the collection, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0030] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

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

[0032] Exemplarily, for any node sending a message, the message is transmitted through a channel.

[0033] The logical or physical transmission channel of the 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, a sending node maintains a channel pool, which includes a set of channel resources. 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 into the channel pool. When the message is sent next time, the channel allocation needs to be re-executed.

[0035] However, in the prior art solution, it is time-consuming to perform channel allocation before each message is sent. The message can only be sent after the channel allocation is completed, resulting in a high overall delay in sending messages.

[0036] The message transmission method provided in this application is intended to solve the above technical problems in the prior art.

[0037] Figure 2 A flow chart of a message transmission method provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, an 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 a message to be sent and a target node identifier.

[0039] The execution subject of this embodiment is a sending node, that is, a 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 perform a specific function, the application module generates a message to be sent during the execution of the function, 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 sent as indicated by 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 multiplexing 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 into the channel pool. When executing message sending next time, there is no need to perform channel allocation, but the channel in the memory is directly used to execute message sending.

[0045] Combined with the scenario example, after the channel is allocated through the channel pool, the channel is stored in the memory, the channel is marked as "active", and the message is sent through the channel in the "active" state. After the message is sent, the channel is marked as "idle" and does not need to be recycled to the channel pool. The channel in the "idle" state can execute the sending of other messages.

[0046] Optionally, the idle reusable list includes location information of at least one idle channel, where the location information is a 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, and the mounting process does not require copying data. It can be understood that since no copying of data is performed, the processor overhead can be reduced.

[0049] Optionally, the network address of the target node is determined, and the network address of the target node is stored in a 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, data is read from a pre-allocated buffer by a network device of the sending node (eg, a network card or other device), encapsulated into a network data packet in a format of a static protocol header, and sent to a network address corresponding to a target node.

[0051] The message transmission method provided in the embodiment of the present application receives a message sending request, the message sending request includes a message to be sent and a target node identifier; according to the message sending request, a target multiplexing channel is determined through an idle multiplexing list; the message to be sent is mounted on the target multiplexing channel, and the message to be sent is sent to the target node corresponding to the target node identifier through the target multiplexing channel. The above scheme transmits messages through a multiplexed channel. Since there is no need to perform the operation of allocating channels for messages to be sent through a channel pool, the message transmission delay problem 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, Figure 3 , the detailed process of message transmission is explained.

[0053] Figure 3 A flow chart of a message transmission method provided in an embodiment of the present application. Figure 3 As shown, the method includes:

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

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

[0056] S302: Determine multiple channels to be selected from the memory using multiple channel pointers stored in the idle reusable list.

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

[0058] Optionally, channels are stored in continuous memory blocks. Each channel is stored in a continuous memory block after being allocated from a channel pool. The continuous memory blocks can avoid additional overhead caused by cross-memory block access when obtaining the selected channel, thereby improving the efficiency of obtaining the selected channel.

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

[0060] S303: Determine multiple channel states corresponding to multiple channels to be selected.

[0061] Optionally, each channel to be selected may include at least one channel state.

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

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

[0064] S304 , sorting multiple channels to be selected according to 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 a channel state type of focus, and the sorting process is performed according to the channel state type of focus. For example, the focus is on the load, and the multiple channels to be selected are sorted according to the size of the load.

[0066] Optionally, the sorting strategy includes a weight for each channel status type, and the sorting process is performed according to the weight. For example, the channel status of each candidate channel includes a historical error rate and a load, and the historical error rate and the load are weighted according to the weight to obtain the overall channel status of each candidate channel, and the multiple candidate channels are sorted according to the overall channel status.

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

[0068] S305 . Determine a target multiplexing channel from a plurality of channels to be selected according to the channel sorting.

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

[0070] Combined with the scenario example, the candidate channel with the highest ranking has better comprehensive performance. 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, the target multiplexing channel is determined based on the message sending request.

[0072] Combined with the scenario example, 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 channel requirements are lower. At this time, the highest-ranked multiplexing channel can be allocated to the core message, and the non-core message can be allocated to the multiplexing channel with a lower priority, so as to achieve overall planning and improve the overall data transmission performance of the sending node.

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

[0074] A feasible implementation method, after sending the message to be sent, may also include: resetting the target multiplexing channel to obtain a reset channel; updating the idle multiplexing 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 deleting the message length, deleting the temporary buffer content, or deleting the network address.

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

[0077] Exemplarily, a channel pointer of the reset channel is determined, and the channel pointer of the reset channel is added to an idle reusable list to obtain an updated list.

[0078] Combined with the scenario example, the channel reuse process can include: message sending: transmitting the message to be sent through the selected target multiplexing channel. Channel state reset: after the message transmission is completed, the target multiplexing channel is released for resource release and parameter reset. Reset channel generation: re-evaluate its availability according to the reset channel state. Idle list update: based on the evaluation result of the reset channel, dynamically refresh the system's idle reusable list. Reuse decision: use the updated update list for the next channel selection to form a closed-loop management. It can be understood that through closed-loop management, the idle reusable list update cycle can be shortened to accurately respond to network changes. Through reset and reuse, channel utilization can be improved.

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

[0080] Optionally, the update process may include: adding a new reusable channel, adding the reset channel that has passed 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 too high frequency overlap), the update will be postponed until the interference is resolved. Removing invalid channels: deleting channels that have entered a cooling-off period or are permanently disabled from the idle reusable list. Dynamic blacklist: channels that have failed to be evaluated for three consecutive times will be automatically added to the blacklist or recycled to the channel pool. Priority adjustment: reorder and update based on the channel's historical performance (such as average throughput, stability, etc.).

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

[0082] Optionally, the target multiplexing channel is updated immediately after the message is sent to avoid using outdated channel information. The abnormal channels are automatically isolated through the cooling period and blacklist mechanism to reduce the need for manual intervention. The update of the target multiplexing channel is decoupled from the multiplexing decision to ensure that there is no service interruption during the switching process.

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

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

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

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

[0087] Optionally, the abnormal 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 detection message and detect the response time, etc. The first verification result is used to indicate whether the reset channel can be used. Specifically, physical layer indicators, such as whether the signal-to-noise ratio and / or bit error rate are normal, can be detected. Residual interference can be detected, such as measuring whether the leakage power of adjacent channels is normal. Hardware status detection can be performed, such as reading the RF front-end status register, and determining whether it is normal by judging whether the hardware fault flag is set.

[0088] Next, combine Figure 5 The update process is described.

[0089] Figure 5 This is a schematic diagram of the update process provided in the embodiment of the present application. Figure 5 As shown, for any reset channel, the reset channel is subjected to abnormal verification processing, and the abnormal verification processing 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, then 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. In order to avoid the reset channel affecting message sending, the reset channel is recycled to the channel pool, and the idle channel is reallocated from the channel pool, and the idle reusable list is updated with the idle channel instead of the reset channel.

[0090] Optionally, reclaiming and resetting channels and reallocating idle channels may be performed simultaneously or in steps.

[0091] Exemplarily, during the process of reclaiming the reset channel and reallocating the idle channel, 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 message transmission efficiency.

[0092] In this feasible implementation, the abnormal verification and recovery mechanism can avoid the direct reuse of abnormal channels and affect subsequent message transmission, thereby improving the reliability of message transmission.

[0093] A feasible implementation method, the message transmission method also includes: determining a verification cycle, performing abnormal verification processing on the channels in the idle reusable list according to the verification cycle, and obtaining a second verification result, 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.

[0094] Exemplarily, the verification cycle is a cycle for verifying the idle reusable list, and automated verification can be implemented through the verification cycle.

[0095] Optionally, the appropriate verification period is dynamically adjusted according to the business requirements, load and other information of the sending node.

[0096] Combined with the scenario example, a normal channel may become abnormal due to external or internal reasons over time. Regular verification can detect abnormal channels in time and recycle them.

[0097] Optionally, after the abnormal channels are recycled, normal channels are allocated from the channel pool, and the idle reusable list is updated through the normal channels to ensure that there are enough idle channels for multiplexing, avoiding the problem of low transmission efficiency caused by allocating channels only when they are needed.

[0098] In this feasible implementation, by periodically verifying the channel, abnormal channels can be recovered in time, and the abnormal channels can be prevented from affecting subsequent message sending, thereby improving the reliability of message transmission.

[0099] In a feasible implementation manner, the message transmission method also includes: determining a target channel identifier of a target multiplexing channel; determining a first corresponding relationship between the channel identifier and the port resource identifier; determining a target port resource identifier based on the target channel identifier and the first corresponding relationship, 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.

[0100] Among them, the port resource is a resource pool used by the sending node to temporarily store messages to be sent. When the message sending is abnormal, the message can be resent through the messages to be sent stored in the resource pool 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 channels and port resources. In the related art, the target port resource is determined by traversing the port resource list, and the traversal process is time-consuming, resulting in low message transmission efficiency.

[0102] Exemplarily, the target channel identifier is a 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 assigned: the identifier is generated according to a predefined rule, for example, the target channel identifier is obtained by combining the channel frequency band, bandwidth, or time slot number. The target channel identifier can be dynamically generated: the system or channel pool automatically assigns a unique identifier when the target multiplexing channel is created to ensure global uniqueness.

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

[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 mapping table can be maintained in a 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 mapping table can be maintained in a dynamic binding manner: the mapping relationship is adjusted in real time according to the network status, for example, when a port resource is overloaded, the channel is dynamically bound to a backup port resource.

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

[0107] Optionally, each port resource is associated with an independent send buffer for temporarily storing messages to be sent. The send buffer is usually divided into queues according to priority (for example, a high-priority queue stores emergency control instructions, and a normal 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. The send queue with the corresponding priority is selected according to the business type of the message. The port driver interface is called to write the data packet into the buffer and wait for the hardware or protocol stack to schedule the transmission.

[0108] Optionally, if a port resource hardware failure or a 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 backup port resource. When the network topology changes or business needs 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, the flow control mechanism is triggered (such as suspending writing or discarding low-priority data) to ensure that high-priority services are not affected.

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

[0110] In this feasible implementation, the target port resources can be quickly determined through the first correspondence, thereby improving the efficiency of message transmission. End-to-end directional transmission is achieved through unique identification and mapping tables to avoid 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. Abnormal detection and automatic switching mechanisms ensure transmission continuity.

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

[0112] Among them, message aggregation is to aggregate multiple messages to port resources for unified sending, and 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 art, for any scenario, message aggregation is performed at the window layer, and the aggregated messages are sent to the communication layer, which then sends the aggregated messages to the receiving node, which may cause the problem of excessive load pressure on message sending.

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

[0116] Optionally, the current transmission load of the sending node is determined based on the number and size of messages not sent by the sending node.

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

[0118] Combined with the scenario example, in the scenario with high transmission load, not aggregating messages can simplify the processing flow and reduce the delay caused by the transmission load. In the scenario with low transmission load, aggregating messages can maximize the use of communication resources. Under low transmission load pressure, sending message aggregation can maximize the use of communication resources, that is, one request can transmit multiple messages, regardless of which application module the message comes from. However, when the transmission load pressure is large enough, it is necessary to cut the sending message aggregation, reducing message aggregation, simplifying the processing flow and improving the efficiency of message sending. The application module itself decides whether to aggregate messages. Large messages can be directly transmitted to the window layer individually. When 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 messages from the application module, they directly match the port resources and are transmitted to the other node by the channel. Aggregation is no longer considered, thereby improving the efficiency of message sending.

[0119] In this feasible implementation, by flexibly performing message aggregation processing, the impact of excessive transmission load on message transmission is avoided while maximizing the use of communication resources.

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

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

[0122] In conjunction with the scenario example, the aggregation margin indicates how many unsent messages can be aggregated.

[0123] In this feasible implementation, by determining the aggregation margin, it is possible to clearly determine 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 to-be-sent messages in the target port resources through the following method, including: determining the message type of the to-be-sent message from the message header of the to-be-sent message, the message type being a real-time stream or batch data; if the message type of the to-be-sent message is a real-time stream, storing the to-be-sent message in the target port resources; if the message type of the to-be-sent message is a batch message, performing message aggregation processing on the unsent messages and the to-be-sent messages to obtain a second aggregate message, and storing the second aggregate message in the target port resources.

[0125] For example, real-time streaming messages have high latency requirements and need to be sent quickly, such as video call messages. Batch data type messages have lower latency requirements, such as log files or offline tasks.

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

[0127] In this feasible implementation, through flexible aggregation processing, it is possible to determine whether to perform message aggregation according to actual scenarios, thereby avoiding message aggregation affecting the normal sending of messages, thereby improving message transmission efficiency.

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

[0129] Among them, the response processing is that after receiving the message, the receiving node sends a response 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 response indication.

[0130] Exemplarily, the response link is that after the receiving node completes the reception, 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 of a read request, obtains the local sequence number, and writes the command description block byte of the protocol command; when the sending node returns the message, it obtains the local sequence number and writes the command description block byte of the protocol command. When the protocol command carrying the feedback sequence number is sent to the message sending node, after the communication layer of the sending node receives it, it will asynchronously transmit the kernel where the message is located to perform a response operation. The response operation may include: comparing the feedback sequence number with the linked list of the sending message queue (including messages that have been sent but not recovered), 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 executed serially to recycle and destroy the message, and the messages in the linked list are compared and processed one by one until the condition is not met. Because the response link is part of the message transmission flow, it takes a certain time for the message transmission process. It causes a delay in the start time point of the idle waiting of the sending end channel, and causes a delay in parsing and forwarding the message content at the receiving end.

[0131] In the related art, after receiving a response indication, the sending node determines the corresponding message according to the response indication, and after destroying the corresponding message, the channel changes to an idle state, resulting in a long idle waiting time of the channel, which in turn leads to 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 by the sequence number.

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

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

[0136] A feasible implementation method can perform message reply processing through the following method, including: 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 reply sequence number, wherein the sequence number of at least one message to be destroyed is less than or equal to the reply sequence number; and performing asynchronous destruction processing on at least one message to be destroyed to implement message reply processing.

[0137] Next, combine Figure 6 The message response is explained.

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

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

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

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

[0142] Combined with the scenario example, after the message response is completed, it means that the receiving node has received the message, and the task of message transmission is completed. Remove the to-be-destroyed message from the target port resources to prevent the to-be-destroyed message that is no longer needed from continuing to occupy the target port resources.

[0143] In this feasible implementation, at least one message to be destroyed is removed from the target port resource so that the target port resource can normally process subsequent message transmission, thereby improving the reliability of message transmission.

[0144] Figure 7 A flow chart of a message transmission method provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, an embodiment of the present application provides a message transmission method, and the method is described in detail as follows:

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

[0146] The execution subject of this embodiment is a receiving node.

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

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

[0149] S702: Determine a 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 messages at the back of the queue need to wait in line. When there are many messages in the queue, the waiting time will lead to 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, multiple queues are processed in parallel without interfering with each other, thereby improving message processing efficiency.

[0153] A feasible implementation method can determine the target receiving queue by the following method, including: determining the target module identifier in the message header of the message to be processed; determining the second corresponding relationship between the module identifier and the receiving queue; and determining the target receiving queue based on the target module identifier and the second corresponding relationship.

[0154] Exemplarily, the module identifier is a unique identifier of the module. The target module identifier can be used to accurately determine the unique corresponding target application module, which is the application module indicated by the sending node in the message header to process the message.

[0155] Optionally, a one-to-one correspondence between the application modules and the receiving queues is represented by a second corresponding relationship.

[0156] Next, combine Figure 8 The queue parallel scheme is explained.

[0157] Figure 8 Schematic diagram of the queue parallel solution provided in the embodiment of the present application. Figure 8 As shown in the figure, each application module corresponds to a receiving queue, and each application module is used to process 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. Compared with processing one receiving queue, processing multiple receiving queues in parallel can effectively improve message processing efficiency.

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

[0159] S703 , determining a target kernel corresponding to the target receiving queue, and parsing the message to be processed through the target kernel to obtain target content.

[0160] The target content is the specific content in the message to be processed that needs to be processed by the application module.

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

[0162] Optionally, pre-allocate a core to each receive queue.

[0163] In a feasible implementation, the message transmission method also includes: determining the module to be allocated and the module identifier of the module to be allocated; determining the idle core from the receiving node; establishing an idle queue corresponding to the idle core; and updating the second corresponding relationship according to the module identifier of the module to be allocated and the idle queue.

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

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

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

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

[0168] In this feasible implementation, by assigning a core to each queue, dedicated cores can be used for specific purposes. Compared with one core processing multiple queues, the message processing efficiency can be effectively improved.

[0169] In a feasible implementation method, the message transmission method also includes: determining multiple candidate sequence numbers corresponding to multiple messages in the target receiving queue; determining a target sequence number based on the multiple candidate sequence numbers, the target sequence number being greater than any other sequence number in the multiple candidate sequence numbers; and sending the target sequence number to a sending node.

[0170] Exemplarily, the target sequence number is sent to implement the response processing of the receiving node to 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 multiple sequence numbers are represented by the largest sequence number among the multiple sequence numbers, that is, 004. The 004 sequence number represents multiple sequence numbers less than or equal to 004, and the sending node can clearly know that the receiving node has received multiple messages with sequence numbers less than or equal to 004 based on the 004 sequence number.

[0172] Next, combine Fig. 9 The message response is explained.

[0173] Fig. 9 A schematic diagram of a message response provided in an embodiment of the present application. Fig. 9 As 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 a 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, by selecting a target sequence number from a plurality of candidate sequence numbers and sending it to a sending node, compared with sending a plurality of candidate sequence numbers, communication resource overhead can be reduced and message transmission efficiency can be improved.

[0175] A feasible implementation method, the message transmission method also includes: determining 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, determining a new kernel from the free kernel pool, and establishing a third corresponding relationship 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.

[0176] Exemplarily, if the number of messages to be parsed is greater than or equal to the number threshold, it means that the processing pressure of the core corresponding to the target receiving queue is large. A new core is added to alleviate the processing pressure of the target receiving queue, thereby improving the parsing efficiency.

[0177] Combined with the scenario example, the message in the target receiving queue corresponds to an application module. When there are many messages corresponding to the application module, storing the messages in the target receiving queue will increase the processing pressure of the corresponding kernel, and it will not be able to process multiple messages in the target receiving queue in time. By adding a new kernel to work with the existing kernel, the messages in the target receiving queue can be processed as soon as possible.

[0178] In this feasible implementation, the cores are flexibly added according to the number of messages in the target receiving queue, which can ensure that the messages in the target receiving queue are processed in time, thereby improving the message processing efficiency.

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

[0180] Fig.10 This is a schematic diagram of the structure of the message transmission device provided in the embodiment of the present application. Fig.10 As shown, the embodiment of the present application further provides a message transmission device, and the message transmission device 100 may include: a first receiving module 101, a determining module 102 and a first sending module 103, wherein:

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

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

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

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

[0185] Optionally, the determination 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 can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

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

[0189] Determine multiple channels to be selected from the memory through multiple channel pointers stored in the idle reusable list;

[0190] Determine multiple channel states corresponding to multiple channels to be selected;

[0191] Sorting multiple channels to be selected according to multiple channel states to obtain channel sorting;

[0192] According to the channel ranking, a target multiplexing channel is determined from a plurality of channels to be selected.

[0193] Fig.11 A schematic diagram of the structure of a message transmission device provided in an embodiment of the present application. Fig.10 Based on the embodiment shown, Fig.11 As 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, wherein:

[0194] The reset module 104 is used to:

[0195] Resetting the target multiplexing channel to obtain a reset channel;

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

[0197] In a possible implementation, the reset module 104 is specifically configured to:

[0198] 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;

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

[0200] If the first verification result is that the channel is abnormal, the reset channel is stored in the 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 an updated list.

[0201] The recovery module 105 is used to:

[0202] 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;

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

[0204] The storage module 106 is used for:

[0205] Determine a target channel identifier of a target multiplex channel;

[0206] Determine a first corresponding relationship between a channel identifier and a port resource identifier;

[0207] 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;

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

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

[0210] determining unsent messages of a sending node, and determining a transmission load based on the unsent messages;

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

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

[0213] If not, the message to be sent is stored in the target port resource.

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

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

[0216] According to the aggregation margin, message aggregation processing is performed on the unsent messages and the messages to be sent to obtain a first aggregated message.

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

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

[0219] 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;

[0220] If the message type of the message to be sent is a batch message, message aggregation processing is performed on the unsent message and the message to be sent to obtain a second aggregate message, and the second aggregate message is stored in the target port resource.

[0221] The response module 107 is used 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 number in the response processing queue.

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

[0225] Determine a message queue, in which sent messages are stored;

[0226] According to the response sequence number, at least one message to be destroyed is determined from the message queue, and the sequence number of the at least one message to be destroyed is less than or equal to the response sequence number;

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

[0228] The destruction module 108 is used to:

[0229] Remove at least one pending message from the target port resource.

[0230] Fig.12 This is a schematic diagram of the structure of the message transmission device provided in the embodiment of the present application. Fig.12 As shown, the embodiment of the present application further provides a message transmission device, and 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 module 126, wherein:

[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 used 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.

[0233] The parsing module 123 is used 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.

[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, the queue module 122 is specifically configured to:

[0238] Determine the 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] A target receiving queue is determined according to the target module identifier and the second corresponding relationship.

[0241] The update module 124 is used to:

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

[0243] Determine the idle cores from the receiving node;

[0244] Create an idle queue corresponding to the idle core;

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

[0246] The second sending module 125 is used for:

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

[0248] Determine a target sequence number according to a 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;

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

[0250] Added new module 126 for:

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

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

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

[0254] Fig.13 This is a schematic diagram of the structure of the electronic device provided in this application. Fig.13 As 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. The processor 1301, the memory 1302 and the communication component 1303 are connected via a bus.

[0255] In the 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-mentioned message transmission method embodiment.

[0256] The specific implementation process of the processor 1301 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

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

[0258] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.

[0259] 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. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.

[0260] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned message transmission method embodiments when running.

[0261] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0262] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above-mentioned message transmission method embodiments are implemented.

[0263] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned message transmission method embodiments are implemented.

[0264] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0265] The above is a detailed introduction to a message transmission method, device, electronic device, medium and product provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A message transmission method, 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 the target multiplexing channel through the idle multiplexing list; The message to be sent is mounted to the target multiplexing channel, and the message to be sent is 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 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: After sending the message to be sent, the method further includes: 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.

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

5. The message transmission method according to claim 4, 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.

6. 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.

7. The message transmission method according to claim 6, 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.

8. The message transmission method according to claim 7, 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.

9. The message transmission method according to claim 6, 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.

10. 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.

11. The message transmission method according to claim 10, 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.

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

13. A message transmission method, characterized in that: include: Receive the pending message sent by the sending node; 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.

14. The message transmission method according to claim 13, 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.

15. The message transmission method according to claim 13 or 14, 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.

16. The message transmission method according to claim 13, 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.

17. The message transmission method according to claim 13, 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.

18. 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 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 according to 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, the steps of the message transmission method according to any one of claims 1 to 17 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

  • Data transmission method and device, computer readable storage medium and electronic equipment

    CN116032998A

  • Message sending method, message receiving method, device and equipment

    CN116760510A

  • Message transmission method and device, computer equipment and storage medium

    CN117118923A