Message transmission method and system and electronic equipment
By detecting the network card cache space in the cloud service environment and returning the packets to the switch when the conditions are met, forming a transmission loop, the packet overflow and packet loss caused by insufficient network card cache space is solved, and the performance of cloud services is improved.
Patent Information
- Application Number
- CN202411815073.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-18
AI Technical Summary
In a cloud service environment, when the cache space of the network card is insufficient, packet overflow and packet loss will be caused, reducing the performance of the cloud service.
By detecting whether the cache space occupancy of the network card meets the preset conditions, if so, the message will be looped back to the switch to form a transmission loop, so that the message will be transmitted cyclically in the loop until the cache space is sufficient.
It effectively reduces packet loss rate and improves the performance of cloud services, especially in scenarios with high real-time requirements.
Smart Images

Figure CN119652852A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular, to a message transmission method, system and electronic device. Background Art
[0002] Cloud services provide computing resources and services to users through the Internet. Cloud services usually use multiple data processing nodes to complete tasks such as data processing and storage. The above data processing nodes can be virtual data processing nodes running in physical machines. In a cloud service environment, multiple virtual data processing nodes can run in the same physical machine.
[0003] Whether it is a physical machine or a virtual data processing node, it needs to use a network card to connect to the switch to receive network packets forwarded by the switch.
[0004] The switch can send the messages received from the network to the network card, and the network card can distribute the messages to one or more data processing nodes in the physical machine. If the switch forwards a large number of messages from the network to the network card, and the data processing node does not process the data in time, messages will accumulate in the network card, and the switch will continue to send messages to the network card. When the messages in the network card overflow, packet loss will occur, thereby reducing the performance of the cloud service. Summary of the invention
[0005] Embodiments of the present disclosure provide a message transmission method, system, and electronic device.
[0006] In a first aspect, an embodiment of the present disclosure provides a message transmission method, the method comprising: receiving a first message sent by a switch, and detecting whether the space occupancy of a first cache of a network card meets a preset condition; if it is detected that the space occupancy of the first cache meets the preset condition, looping the first message back to the switch, and instructing the switch to send the first message to the network card again; distributing at least part of the second message in the first cache to at least one data processing node of a physical machine.
[0007] In a second aspect, an embodiment of the present disclosure provides a message transmission method, the method comprising: receiving a third message from a network and a first message from a network card for loopback, wherein, when the first message is received by the network card as a first message from a switch, it is detected that the space occupancy of the first cache meets a preset condition, and the first message is looped back to the switch; at least part of the third message and / or at least part of the first message is sent to the network card as a new first message.
[0008] In a third aspect, an embodiment of the present disclosure provides a message transmission system, the system comprising: a switch, a network card, the network card being arranged in a physical machine; wherein the switch comprises a first receiving module, a second receiving module and a first sending module, wherein the first receiving module receives a third message from the network, and the second receiving module receives a first message from the network card for loopback, wherein when the first message is received by the network card from the first message from the switch, it is detected that the space occupancy of the first cache meets a preset condition, and the first message is looped back to the switch; the first sending module sends at least part of the third message and / or at least part of the first message as a new first message to the network card; the network card comprises a detection module, a loopback module and a distribution module, wherein the detection module receives the first message sent by the switch, and detects whether the space occupancy of the first cache meets the preset condition; the loopback module, if it is detected that the space occupancy of the first cache meets the preset condition, loops the first message back to the switch, and instructs the switch to send the first message to the network card again; the distribution module distributes at least part of the second message in the first cache to at least one data processing node of the physical machine.
[0009] In a fourth aspect, an embodiment of the present disclosure provides a message transmission device, comprising: a detection unit, configured to receive a first message sent by a switch, and detect whether the space occupancy of a first cache of a network card satisfies a preset condition; a loopback unit, configured to loop the first message back to the switch if it is detected that the space occupancy of the first cache satisfies the preset condition, and instruct the switch to send the first message to the network card again; and a distribution unit, configured to distribute at least part of the second message in the first cache to at least one data processing node of a physical machine.
[0010] In a fifth aspect, an embodiment of the present disclosure provides a message transmission device, which includes: a receiving unit, used to receive a third message from the network and a first message from a network card for loopback, wherein when the first message is received by the network card as a first message from a switch, it is detected that the space occupancy of the first cache meets a preset condition, and the first message is looped back to the switch; a sending unit, used to send at least part of the third message and / or at least part of the first message as a new first message to the network card.
[0011] In a sixth aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0012] The memory stores computer-executable instructions;
[0013] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the method described in the first aspect, the second aspect, and various possible designs of the first aspect and the second aspect.
[0014] In the seventh aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the method described in the first aspect, the second aspect, and various possible designs of the first aspect and the second aspect are implemented.
[0015] In an eighth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the methods described in the first aspect, the second aspect, and various possible designs of the first aspect and the second aspect.
[0016] The message transmission method, system and electronic device provided by the embodiments of the present disclosure detect whether the space occupancy of the first cache of the network card meets the preset condition by receiving the first message sent by the switch; if it is detected that the space occupancy of the first cache meets the preset condition, the first message is looped back to the switch, and the switch is instructed to send the first message to the network card again; at least part of the second message in the first cache is distributed to at least one data processing node of the physical machine. When the space occupancy of the first cache of the network card meets the preset condition, the switch and the network card form a transmission loop for the first message, and the first message can be circulated once or multiple times in the above transmission loop, thereby reducing the packet loss rate.
[0017] In addition, since the above-mentioned transmission loop only involves the network card and the switch, and does not involve other network devices, even if the first cache space in the network card is insufficient, the switch and the transmission loop in the network card can be used for loop transmission. After the loop is performed in the above-mentioned transmission loop, the time taken for the first message to be finally stored in the corresponding memory buffer by the network card will be shorter than the time taken for retransmission after packet loss, which can improve the performance of cloud services with strong real-time requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0019] Figure 1 A schematic diagram of an application scenario provided by the present disclosure;
[0020] Figure 2 Schematic diagram of the process of the message transmission method provided in the embodiment of the present disclosure Figure 1 ;
[0021] Figure 3 Schematic diagram of the process of the message transmission method provided in the embodiment of the present disclosure Figure 2 ;
[0022] Figure 4 A schematic diagram of a flow chart of a message transmission method provided in an embodiment of the present disclosure;
[0023] Figure 5 A schematic diagram of the structure of a message transmission system provided in an embodiment of the present disclosure;
[0024] Figure 6 A schematic diagram of the structure of a message transmission device provided in an embodiment of the present disclosure;
[0025] Figure 7 A schematic diagram of the structure of a message transmission device provided in an embodiment of the present disclosure;
[0026] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0028] Please refer to Figure 1 , Figure 1 Schematic diagram of message transmission in a cloud service scenario. In a cloud service scenario, multiple network storage servers 101 in a network storage cluster can generate messages based on stored data and distribute them to different switches 102. Multiple switches 102 form a switch group. For each switch 102, the switch 102 receives messages from one or more network storage servers 101 in the storage cluster, and sends the messages to the network interface card (NIC) 104 of the physical machine 103. It can be understood that the same switch 102 can be connected to the network cards 104 of multiple physical machines 103 to send messages to multiple network cards 104 respectively.
[0029] One or more data processing nodes can be run on the physical machine 103. The network card 104 can distribute the received messages to multiple data processing nodes for processing through the direct memory access (DMA) technology. For the network card 104, the distribution of the messages sent by the switch 102 to the network card at different times is uneven. At some times, the number of messages sent by the switch 102 to the network card is large, and at some times, the number of messages sent by the switch 102 to the network card is small. In addition, the processing capacity of the data processing nodes in the physical machine 103 is also volatile. When the number of messages sent by the switch 102 is large and the processing capacity of the data processing nodes decreases, messages will accumulate in the network card 104. When a large number of messages are accumulated in the network card 104, message overflow will cause packet loss. Packet loss in the network card 104 will reduce the performance of the cloud service.
[0030] The present disclosure provides a message transmission method, system and electronic device. When a network card receives a message from a switch, if it detects that there is insufficient cache space, the message is looped back to the switch, and then transmitted to the network card by the switch, thereby utilizing the storage space of the switch to alleviate the storage pressure of the network card, reducing the packet loss rate of the message, and being beneficial to improving the performance of cloud services.
[0031] Please refer to Figure 2 , Figure 2 A flow chart of a message transmission method provided by the present disclosure is as follows: Figure 2 As shown, the method comprises the following steps:
[0032] S201: Receive a first message sent by a switch, and detect whether the space occupancy of a first cache of a network card meets a preset condition.
[0033] In this embodiment, the execution subject of the message transmission method may be a network card in a physical machine. In some examples, the network card may be a smart network card. In addition to the basic functions of a traditional network card, a smart network card also integrates additional computing resources, has its own onboard processor, an accelerator with a customized application-specific integrated circuit implementation solution, or a programmable logic gate array and high-speed memory.
[0034] In this embodiment, the number of the above switches may include one or more. The switch is responsible for forwarding messages between multiple network devices. The above switch can receive messages sent from the network storage cluster, and then send the messages to the network card in the physical machine. It is understandable that the above switch can continue to receive messages from the storage cluster, and then continue to forward the messages to the corresponding network card according to the IP address (Internet Protocol Address) and the destination MAC (Media Access Control) address of the message.
[0035] The physical machine may include electronic devices such as user terminals and servers that have data storage and data processing capabilities. The execution subject of the above-mentioned message transmission method may be a network card set in the above-mentioned physical machine. The above-mentioned network card (Network Interface Card, NIC) is an interface device connected between the physical machine and the network, responsible for receiving the bit stream corresponding to the message from the switch. The data generated by one or more data processing nodes in the above-mentioned physical machine can also be encapsulated into a message and sent to the switch, so that the switch can send the message generated by the data processing node to the network.
[0036] The network card may include a first cache. After receiving the bit stream of the first message from the switch, the network card decapsulates the received bit stream into one or more message frames (Frame), and stores the one or more message frames in the first cache. The message frame usually includes a header (Header) and a payload (Payload). The header contains control information, such as source MAC address, destination MAC address, source IP address, destination IP address, protocol type, length, etc. The payload is the actual transmitted data.
[0037] The network card can extract each message frame from the first cache in a first-in-first-out order. Each message frame is sent to a memory space pre-allocated by the kernel in the physical machine. The operating system of the physical machine can parse the message frame from the memory space, and extract the header (source MAC address, destination MAC address, source IP address, destination IP address, etc.) and the payload from the message frame. According to the destination IP address in the header, the operating system sends the payload to the data processing node corresponding to the destination IP address.
[0038] A physical machine may have one or more data processing nodes. The one or more data processing nodes may have resources such as a processor and a memory. In some application scenarios, the above data processing nodes may be virtual data processing nodes.
[0039] In some application scenarios, the network card may periodically receive a first message sent by the switch. The first message may include one or more message frames.
[0040] The space of the first cache of the above-mentioned network card is usually limited. The amount of message data sent by the switch to the network card at different times is unevenly distributed. Due to the limitation of the data processing capacity of the data processing node, the data processing node cannot extract the effective load from the corresponding memory space for processing in time. Therefore, it will cause the accumulation of messages in the first cache of the network card. In order to avoid the large space occupied by the first cache causing message overflow and packet loss, it is necessary to detect whether the space occupied by the first cache meets the preset conditions. The preset condition here is the condition for starting the loopback of the first message to the switch.
[0041] In some implementations, the above step S201 includes the following sub-steps:
[0042] First, the data volume of the received first message and the data volume of the second message output to the memory space corresponding to the data processing node are obtained.
[0043] Secondly, the space occupancy of the first cache space is determined according to the data volume of the first message and the data volume of the second message.
[0044] In some application scenarios, the data volume of the first message received may be the total data volume of messages received from the switch within a preset time period; the data volume of the second message output may be the total data volume output to the memory space corresponding to each data processing node within a preset time period. The preset time period may be 1 hour, 2 hours, etc., and may be set according to the specific application scenario, and is not limited here.
[0045] The difference between the amount of data of the received first message and the amount of data of the output second message can be calculated, and the obtained difference can be regarded as the amount of message data stored in the first cache. That is, the size of the space occupied by the first cache can be the difference between the amount of data of the received first message and the amount of data of the output second message.
[0046] In these implementations, by determining the space occupancy of the first cache space according to the data volume of the received first message and the data volume of the output second message, the network card can estimate the space occupancy of the first cache.
[0047] In some implementations, the above step S201 further includes:
[0048] If the space occupancy of the first cache space is greater than or equal to a first preset threshold, the preset condition is met.
[0049] As an example, the space size of the first cache may be N megabits. The space occupancy of the first cache space is the amount of data stored in the first cache space. In this example, the first preset threshold may be a specified amount of data, such as M megabits. The above N and M are respectively values greater than or equal to 0, and M is less than N.
[0050] As an example, the space occupied by the first cache may be a ratio of the amount of stored message data to the size of the first cache space, for example, the amount of stored message data is K megabits, the size of the first cache space is N megabits, and the space occupied by the first cache is K / N. In this example, the first preset threshold may be a preset ratio, for example, the first preset threshold may be 1 / 2, etc.
[0051] S202: If it is detected that the space occupancy of the first cache meets a preset condition, the first message is looped back to the switch, and the switch is instructed to send the first message to the network card again.
[0052] S203: Distribute at least part of the second message in the first cache to at least one data processing node of the physical machine.
[0053] The network card can detect the space occupancy of its first cache, and when the space occupancy of the first cache meets a preset condition, the network card can send the first message to the switch for loopback, and instruct the switch to send the first message to the network card again.
[0054] Usually, the data storage space in the switch is larger than that in the network card, so the data storage space in the switch can be used to cache the first message and then send it to the network card again, thereby using the storage space of the switch to relieve the pressure of the first cache of the network card to reduce packet loss.
[0055] In some application scenarios, transport layer protocols (such as TCP (Transmission Control Protocol)) can use sequence numbers and confirmation mechanisms to ensure reliable data transmission. If the storage cluster does not receive the confirmation (Acknowledgment, ACK) of the message sent by the data processing node within the expected time, it can be considered that the message has been lost and retransmitted. If the data processing node finds that the sequence number of the data packet is not continuous, it will also request the storage cluster to retransmit the lost data packet. Therefore, it takes a long time to retransmit the data after the packet is lost, which is not conducive to cloud services with high real-time requirements.
[0056] In the solution provided by this embodiment, when the space occupancy of the first cache of the network card meets the preset conditions, the switch and the network card form a transmission loop for the first message, and the first message can be circulated once or multiple times in the above transmission loop, thereby reducing the packet loss rate of the message. In addition, since the above transmission loop only involves the network card and the switch, and does not involve other network devices, even if the first cache space in the network card is insufficient, the transmission loop in the switch and the network card can be used for loopback transmission. After the loop is performed in the above transmission loop, the time taken for the first message to be finally stored in the corresponding memory buffer by the network card will also be shorter than the time taken for retransmitting the first message after packet loss, which can improve the performance of cloud services with strong real-time requirements.
[0057] Please refer to Figure 3 , Figure 3 Schematic diagram of the message transmission method Figure 2 ,like Figure 3 As shown, the method comprises the following steps:
[0058] S301: Receive a first message sent by a switch, and detect whether the space occupancy of a first cache of a network card meets a preset condition.
[0059] The execution subject of the message transmission method may be a network card set in a physical machine. The specific implementation of step S301 may refer to Figure 2 The description of step S201 in the illustrated embodiment is not repeated here.
[0060] S302: In response to the lifetime value of the first message being greater than zero, looping the first message back to the switch, reducing the lifetime value by a preset value to obtain an updated lifetime value; and instructing the switch to send the first message to the network card again.
[0061] The space occupancy of the first cache satisfies a preset condition, for example, the space occupancy of the first cache may be greater than or equal to a first preset threshold. If the space occupancy of the first cache satisfies the preset condition, it is also necessary to detect the value of the time to live (TTL). TTL is the maximum number of hops that a message can be forwarded in a computer network. The value of TTL is set by the sender of the message. On the entire message forwarding path from the source MAC address to the destination MAC address, the value of TTL will be reduced by the preset value each time before forwarding the message. The preset value may be, for example, 1.
[0062] In this embodiment, when the TTL value is detected to be greater than 0, the first message is looped back to the switch, and if the TTL value is detected to be 0, the loop is stopped. The above TTL value can control the number of times the network card loops back the first message to the switch to avoid infinite loops.
[0063] In some implementations, the above step S302 includes:
[0064] The destination MAC address and the source MAC address in the first message are exchanged, and the first message with the destination MAC address and the source MAC address exchanged is sent to the switch.
[0065] MAC address, also known as physical address or hardware address, is a fixed address for network devices. The destination MAC address refers to the MAC address of the network device to which the message is to be sent, and the source MAC address is the MAC address of the network device that sends the message.
[0066] In this embodiment, the switch receives a first message A from other network devices. The SMAC (Source MAC) address in the first message A is the MAC address of the port of the other network device that outputs the first message, and the destination MAC address can be the MAC address of the switch receiving port. If the switch needs to send the first message A to the network card through port 3 of the switch, the switch can update the source MAC address of the first message to the MAC address of switch port 3, and the destination MAC address to the MAC address of the network card receiving port 4. The source MAC address of the first message received by the network card is the MAC address of switch port 3, and the destination address is the MAC address of the network card receiving port 4.
[0067] Before the network card loops back the first message to the switch, in order to allow the switch to send the first message to the network card again, the network card needs to exchange the destination MAC address and the source MAC address in the first message. After exchanging the destination MAC address and the source MAC address, the network card can send the first message to the switch. As a schematic illustration, before the switch sends the first message P1 to the network card, the switch updates the source MAC address in the message P1 to the MAC address S1 corresponding to the port 3 of the switch, and the destination MAC address is updated to the MAC address D1 corresponding to the receiving port 4 of the network card; when the network card loops back the first message P1 to the switch, the destination MAC address D1 and the source MAC address S1 in the first message P1 are exchanged. In this way, the network card can send the first message P1 to the port 3 of the switch, and the port 3 of the switch receives the first message P1.
[0068] When the switch sends the first message P1 to the network card again, it resets the source MAC address D1 of the first message P1 to the port S1 corresponding to port 3, and resets the destination MAC address to the MAC address D1 corresponding to the network card receiving port 4. The cycle continues.
[0069] In these implementations, the first message may be looped back to the switch by exchanging the destination MAC address and the source MAC address in the first message.
[0070] In some embodiments, the method further comprises:
[0071] In the process of looping the first message back to the switch, the destination IP address of the first message is kept unchanged, wherein the destination IP address is the IP address corresponding to the receiving port of the network card, which is used to instruct the switch to send the first message to the network card.
[0072] The IP address is the logical address corresponding to the network device. In some application scenarios, different ports of the same network card may correspond to different IP addresses.
[0073] In one example, the message header of the first message includes a data link layer header and a network layer header. The data link layer header includes a source MAC address and a destination MAC address. The network layer header may include a source IP address and a destination IP address. The destination IP address may be, for example, an IP address corresponding to a port of a network device. The IP address of the message is used for routing selection at the network layer. When the message is transmitted from one network to another, the IP address is used to determine the path of the next hop. The source IP address and the destination IP address remain unchanged during the entire transmission process of the message. This allows the message to be transmitted in the network and eventually reach the destination.
[0074] S303: Distribute at least part of the second message in the first cache to at least one data processing node of the physical machine.
[0075] In this embodiment, whether to loop back is determined according to the TTL value, which can avoid the message from circulating infinitely between the network card and the switch, thereby facilitating the effective transmission of subsequent messages.
[0076] Please refer to Figure 4 , Figure 4 A flow chart of a message transmission method is shown in FIG. Figure 4 As shown, the method comprises the following steps:
[0077] S401: receiving a third message from the network and a first message from the network card for loopback, wherein when the first message is received by the network card from the first message from the switch, it is detected that the space occupancy of the first cache meets a preset condition, and the first message is looped back to the switch.
[0078] In this embodiment, the execution subject of the message transmission method may be a switch. The switch may receive a third message from the network, for example, a third message sent from a network storage device.
[0079] In addition, the switch can also receive the first message from the network card for loopback. The process of the network card sending the first message for loopback to the switch can be referred to Figure 2 and Figure 3 The description of the illustrated embodiment is not repeated here.
[0080] S402: Send at least part of the third message and / or at least part of the first message as a new first message to the network card.
[0081] In some examples, the switch may send a part or all of the third message to the network card as a new first message.
[0082] In some examples, the switch may send a part or all of the first message to the network card as a new first message.
[0083] In some implementations, the above step S401 includes:
[0084] The third message is stored in the first cache queue, and the first message is stored in the second cache queue, and the above step S402 includes:
[0085] Extracting a third message from the first cache queue according to a preset priority and sending it to the network card as a new first message, or extracting a first message from the second cache queue and sending it to the network card as a new first message; or,
[0086] According to the preset weight, part of the third message is extracted from the first cache queue, and part of the first message is extracted from the second queue to form a new first message, which is sent to the network card.
[0087] The first buffer queue can be used to buffer messages from the network. Here, the messages from the network can be regarded as third messages.
[0088] The second cache queue can be used to cache messages from the network card. Here, the message sent from the switch to the network card and the message looped back from the network card to the switch can be regarded as the first message.
[0089] The message sent by the network card to the cache on the physical machine is regarded as the second message.
[0090] In some application scenarios, priorities can be set for the first cache queue and the second cache queue respectively. Schematically, the priority in the first cache queue can be set higher than that in the second cache queue. If there is a third message in the first cache queue, the third message in the first cache queue is sent to the network card first. In addition, the priority of the second cache queue can be set higher than that of the first cache queue. If there is a first message in the second cache queue, the first message in the second cache queue is sent to the network card first.
[0091] In these application scenarios, by setting corresponding priorities for the first cache queue and the second cache queue, the third message is extracted from the first cache queue according to the priority and sent to the network card as a new first message; or the first message is extracted from the second cache queue and sent to the network card as a new first message.
[0092] In some application scenarios, the first cache queue and the second cache queue may be respectively set with corresponding preset weights, for example, the first cache queue is set with a first weight, and the second cache queue is set with a second weight. When the switch detects that both the first cache queue and the second cache queue store messages, it may extract part of the third message from the first cache queue according to the first weight, and extract at least part of the first message looped back to the switch from the second cache queue according to the second weight, and form a new first message with the part of the third message and at least part of the first message to send to the network card.
[0093] In an illustrative manner, the total data volume of the new first message can be determined first, and then the number of message frames in the third message extracted from the first cache queue can be calculated according to the preset weights of the first cache queue and the second cache queue, and the number of message frames can be regarded as the first number of frames. The number of message frames of the first message extracted from the second cache queue can be calculated, and the number of message frames can be regarded as the second number of frames. The message frames of the first number of frames extracted from the first cache queue and the message frames of the second number of frames can be used to form a new first message, and the new first message can be sent to the network card.
[0094] It is understandable that in these application scenarios, at least part of the first message still carries a message header including a source MAC address, a destination MAC address, a source IP address, and a destination IP address. At least part of the third message still carries a message header including a source MAC address, a destination MAC address, a source IP address, and a destination IP address. In this way, at least part of the first message and at least part of the third message can be transmitted to an accurate data processing node.
[0095] It is understandable that when sending a new first message to the network card, if the network card detects that the space occupied by the first cache meets the preset condition, the new first message can be looped back to the switch. The switch can cache the looped new first message as the first message in the second cache queue.
[0096] In this embodiment, the switch receives the third message from the network and the first message from the network card for loopback, and sends at least part of the third message and / or at least part of the first message as a new first message to the network card. Thus, the switch receives the first message from the network card for loopback and transmits it to the network card again, so that the switch and the network card form a transmission loop for the first message, and the first message can be circulated once or multiple times in the above transmission loop, which can reduce the packet loss rate caused by discarding the message due to insufficient cache space of the network card, thereby improving the cloud service performance.
[0097] In addition, since the above-mentioned transmission loop only involves the network card and the switch, and does not involve other network devices, when there is insufficient cache space in the network card, the switch and the transmission loop in the network card can be used for loopback. After the loopback in the above-mentioned transmission loop, the time taken for the first message to be finally stored in the memory buffer of the corresponding physical machine by the network card will also be shorter than the time taken for the discarded message to be retransmitted from the sender after the packet is lost, which can improve the performance of cloud services with strong real-time requirements.
[0098] Please refer to Figure 5 , Figure 5 The structure diagram of the message transmission system provided by the present disclosure is as follows. Figure 5As shown, the system includes a switch 501 and a network card 502. The network card can be set in a physical machine. The switch 501 includes a first receiving module 5011, a second receiving module 5012 and a first sending module 5013, wherein the first receiving module 5011 receives a third message from the network, and the second receiving module 5012 receives a first message from the network card for loopback, wherein when the first message is received by the network card from the switch, it is detected that the space occupancy of the first cache meets a preset condition, and the first message is looped back to the switch; the first sending module sends at least part of the third message and / or at least part of the first message as a new first message to the network card;
[0099] The network card 502 includes a detection module 5021, a loopback module 5022 and a distribution module 5023, wherein the detection module 5021 receives a first message sent by the switch and detects whether the space occupancy of the first cache meets a preset condition; the loopback module 5022, if detecting that the space occupancy of the first cache meets the preset condition, loops the first message back to the switch and instructs the switch to send the first message to the network card again; the distribution module 5023 distributes at least part of the second message in the first cache to at least one data processing node of the physical machine.
[0100] The physical machine mentioned above may be a desktop computer, a server, a portable notebook computer, etc. with computing and storage capabilities.
[0101] The detection module 5021 in the network card 502 can obtain the data volume of the received first message and the data volume of the second message output to the memory space corresponding to the data processing node; determine the space occupancy of the first cache space based on the data volume of the received first message and the data volume of the output second message.
[0102] For example, the data volume of the received first message minus the data volume of the output second message may be used as the data size stored in the first cache, and the space occupancy of the first cache space may be determined accordingly.
[0103] In response to the lifetime value of the first message being greater than zero, the loopback module 5022 in the network card 502 may loop the first message back to the switch 501 , reduce the lifetime value by a preset value, and obtain an updated lifetime value.
[0104] In addition, the loopback module 5022 can also exchange the destination MAC address and the source MAC address in the first message, and send the first message with the exchanged destination MAC address and the source MAC address to the switch. When sending the first message to the switch 501, the loopback module keeps the destination IP address of the first message unchanged.
[0105] After receiving the third message from the network, the first receiving module 5011 of the switch 501 stores the third message in the first cache queue. After receiving the first message that is looped back from the network card 502, the second receiving module 5012 stores the second message in the second cache queue. The first sending module 5013 can extract the third message from the first cache queue or extract the first message from the second cache queue according to the preset priority, and send the extracted third message or first message to the network card as a new first message. Alternatively, according to the preset weight, part of the first message can be extracted from the first cache queue and part of the first message can be extracted from the second cache queue to form a new first message and send it to the network card 502.
[0106] Corresponding to the above Figure 2 , Figure 3 The message transmission method of the embodiment, Figure 6 A schematic structural block diagram of a message transmission device provided in an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 6 , the device 60 includes: a detection unit 601, a loop unit 602 and a distribution unit 603, wherein,
[0107] The detection unit 601 is used to receive a first message sent by the switch and detect whether the space occupancy of the first cache of the network card meets a preset condition;
[0108] The loopback unit 602 is used to loop the first message back to the switch and instruct the switch to send the first message to the network card again if it is detected that the space occupancy of the first cache meets a preset condition;
[0109] The distribution unit 603 is configured to distribute at least part of the second message in the first cache to at least one data processing node of the physical machine.
[0110] In some embodiments, the detection unit 601 is further used to: obtain the data volume of the received first message, and the data volume of the second message output to the memory space corresponding to the data processing node;
[0111] The space occupancy of the first cache space is determined according to the data volume of the first message and the data volume of the second message.
[0112] In some embodiments, the loopback unit 602 is further used to: in response to the lifetime value of the first message being greater than zero, loop the first message back to the switch, and reduce the lifetime value by a preset value to obtain an updated lifetime value.
[0113] In some embodiments, the loopback unit 602 is further configured to: exchange the destination MAC address and the source MAC address in the first message, and send the first message with the exchanged destination MAC address and the source MAC address to the switch.
[0114] In some embodiments, the device also includes a maintaining unit (not shown in the figure), which is used to: keep the destination IP address of the first message unchanged during the process of looping the first message back to the switch, wherein the destination IP address is the IP address corresponding to the receiving port of the network card, and is used to instruct the switch to send the first message to the network card.
[0115] Corresponding to the above Figure 4 The message transmission method of the embodiment shown, Figure 7 A schematic structural block diagram of a message transmission device provided in an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 7 , the device 70 includes: a receiving unit 701 and a sending unit 702, wherein,
[0116] The receiving unit 701 is configured to receive a third message from the network and a first message looped back from the network card, wherein when the first message is received by the network card from the first message from the switch, it is detected that the space occupation of the first cache meets a preset condition, and the first message is looped back to the switch;
[0117] The sending unit 702 is configured to send at least a portion of the third message and / or at least a portion of the first message as a new first message to the network card.
[0118] In some embodiments, the receiving unit 701 is further used to: store the third message into the first cache queue, and store the first message into the second cache queue;
[0119] The sending unit 702 is further used to: extract the third message from the first cache queue as a new first message and send it to the network card according to the preset priority, or extract the first message from the second cache queue as a new first message and send it to the network card; or,
[0120] According to the preset weight, part of the third message is extracted from the first cache queue, and part of the first message is extracted from the second queue to form a new first message, which is sent to the network card.
[0121] In order to implement the above embodiment, the embodiment of the present disclosure also provides an electronic device.
[0122] refer to Figure 8, which shows a schematic diagram of the structure of an electronic device 800 suitable for implementing the embodiment of the present disclosure, and the electronic device 800 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers, portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0123] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 to a random access memory (RAM) 803. Various programs and data required for the operation of the electronic device 800 are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0124] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0125] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0126] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0127] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0128] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0129] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0130] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0131] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0132] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0133] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0134] In a first aspect, according to one or more embodiments of the present disclosure, a message transmission method is provided, comprising: receiving a first message sent by a switch, and detecting whether the space occupancy of a first cache of a network card meets a preset condition;
[0135] If it is detected that the space occupancy of the first cache meets a preset condition, the first message is looped back to the switch, and the switch is instructed to send the first message to the network card again;
[0136] Distribute at least part of the second message in the first cache to at least one data processing node of the physical machine.
[0137] According to one or more embodiments of the present disclosure, detecting whether the space occupancy of the first cache meets a preset condition includes:
[0138] Acquire the data volume of the received first message and the data volume of the second message output to the memory space corresponding to the data processing node;
[0139] The space occupancy of the first cache space is determined according to the data volume of the received first message and the data volume of the output second message.
[0140] According to one or more embodiments of the present disclosure, sending a first message to a switch, and instructing the switch to send the first message to a network card again, includes:
[0141] In response to the value of the lifetime of the first message being greater than zero, the first message is looped back to the switch, and the value of the lifetime is reduced by a preset value to obtain an updated value of the lifetime.
[0142] According to one or more embodiments of the present disclosure, looping back the first message to the switch includes:
[0143] The destination MAC address and the source MAC address in the first message are exchanged, and the first message with the destination MAC address and the source MAC address exchanged is sent to the switch.
[0144] According to one or more embodiments of the present disclosure, the method also includes: in the process of looping the first message back to the switch, keeping the destination IP address of the first message unchanged, wherein the destination IP address is the IP address corresponding to the receiving port of the network card, and is used to instruct the switch to send the first message to the network card.
[0145] In a second aspect, according to one or more embodiments of the present disclosure, a message transmission method is provided, including:
[0146] receiving a third message from the network and a first message looped back from the network card, wherein when the first message is received by the network card from the first message from the switch, it is detected that the space occupation of the first cache meets a preset condition, and the first message is looped back to the switch;
[0147] At least part of the third message and / or at least part of the first message are taken as new first messages and sent to the network card.
[0148] According to one or more embodiments of the present disclosure, receiving a third message from a network and a first message from a network card for loopback includes:
[0149] Storing the third message in the first cache queue and storing the first message in the second cache queue;
[0150] and sending at least part of the third message and / or at least part of the first message as a new first message to the network card, comprising:
[0151] Extracting a third message from the first cache queue according to a preset priority and sending it to the network card as a new first message, or extracting a first message from the second cache queue and sending it to the network card as a new first message; or,
[0152] According to the preset weight, part of the third message is extracted from the first cache queue, and part of the first message is extracted from the second queue to form a new first message, which is sent to the network card.
[0153] In a third aspect, according to one or more embodiments of the present disclosure, a message transmission system is provided, comprising: a switch, a network card, and the network card is arranged in a physical machine; wherein the switch comprises a first receiving module, a second receiving module and a first sending module, wherein the first receiving module receives a third message from the network, and the second receiving module receives a first message from the network card for loopback, wherein when the first message is received by the network card from the first message from the switch, it is detected that the space occupancy of the first cache meets a preset condition, and the first message is looped back to the switch; the first sending module sends at least part of the third message and / or at least part of the first message as a new first message to the network card; the network card comprises a detection module, a loopback module and a distribution module, wherein the detection module receives the first message sent by the switch, and detects whether the space occupancy of the first cache meets the preset condition; the loopback module, if it is detected that the space occupancy of the first cache meets the preset condition, loops the first message back to the switch, and instructs the switch to send the first message to the network card again; the distribution module distributes at least part of the second message in the first cache to at least one data processing node of the physical machine.
[0154] In a fourth aspect, according to one or more embodiments of the present disclosure, a message transmission device is provided, including: a detection unit, used to receive a first message sent by a switch, and detect whether the space occupancy of a first cache of a network card meets a preset condition; a loopback unit, used to loop the first message back to the switch if it is detected that the space occupancy of the first cache meets the preset condition, and instruct the switch to send the first message to the network card again; a distribution unit, used to distribute at least part of the second message in the first cache to at least one data processing node of the physical machine.
[0155] According to one or more embodiments of the present disclosure, the detection unit is further configured to:
[0156] Acquire the data volume of the received first message and the data volume of the second message output to the memory space corresponding to the data processing node;
[0157] The space occupancy of the first cache space is determined according to the data volume of the first message and the data volume of the second message.
[0158] According to one or more embodiments of the present disclosure, the loopback unit is further used to: in response to the lifetime value of the first message being greater than zero, loop the first message back to the switch, and reduce the lifetime value by a preset value to obtain an updated lifetime value.
[0159] According to one or more embodiments of the present disclosure, the loopback unit is further configured to: exchange the destination MAC address and the source MAC address in the first message, and send the first message with the exchanged destination MAC address and the source MAC address to the switch.
[0160] According to one or more embodiments of the present disclosure, the device also includes a maintaining unit (not shown in the figure), which is used to: in the process of looping the first message back to the switch, keep the destination IP address of the first message unchanged, wherein the destination IP address is the IP address corresponding to the receiving port of the network card, and is used to instruct the switch to send the first message to the network card.
[0161] In a fifth aspect, according to one or more embodiments of the present disclosure, a message transmission device is provided, including: a receiving unit, used to receive a third message from the network and a first message from a network card for loopback, wherein when the first message is received by the network card as a first message from a switch, it is detected that the space occupancy of the first cache meets a preset condition, and the first message is looped back to the switch; a sending unit, used to send at least part of the third message and / or at least part of the first message as a new first message to the network card.
[0162] According to one or more embodiments of the present disclosure, the receiving unit is further used to: store the third message in the first cache queue, and store the first message in the second cache queue; the sending unit is further used to: extract the third message from the first cache queue as a new first message and send it to the network card according to a preset priority, or extract the first message from the second cache queue as a new first message and send it to the network card; or,
[0163] According to the preset weight, part of the third message is extracted from the first cache queue, and part of the first message is extracted from the second queue to form a new first message, which is sent to the network card.
[0164] In a sixth aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;
[0165] Memory stores computer-executable instructions;
[0166] At least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the methods of the first aspect, the second aspect, and various possible designs of the first aspect and the second aspect as described above.
[0167] In the seventh aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, in which computer-readable storage medium is stored computer execution instructions. When the processor executes the computer execution instructions, the methods of the first aspect, the second aspect and various possible designs of the first aspect and the second aspect are implemented.
[0168] In an eighth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the methods of the first aspect, the second aspect, and various possible designs of the first aspect and the second aspect.
[0169] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.
[0170] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0171] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A message transmission method, characterized in that: include: receiving a first message sent by the switch, and detecting whether the space occupation of the first cache of the network card meets a preset condition; If it is detected that the space occupancy of the first cache meets a preset condition, looping back the first message to the switch, and instructing the switch to send the first message to the network card again; Distribute at least part of the second messages in the first cache to at least one data processing node of the physical machine.
2. The method according to claim 1, characterized in that The detecting whether the space occupancy of the first cache meets a preset condition includes: Acquire the data volume of the received first message and the data volume of the second message output to the memory space corresponding to the data processing node; The space occupancy of the first cache space is determined according to the data volume of the first message and the data volume of the second message.
3. The method according to claim 1, characterized in that The sending the first message to the switch and instructing the switch to send the first message to the network card again includes: In response to the value of the lifetime of the first message being greater than zero, the first message is looped back to the switch, and the value of the lifetime is reduced by a preset value to obtain an updated value of the lifetime.
4. The method according to claim 1, characterized in that: The looping back the first message to the switch includes: The destination MAC address and the source MAC address in the first message are exchanged, and the first message in which the destination MAC address and the source MAC address are exchanged is sent to the switch.
5. The method according to claim 1, characterized in that: The method further comprises: In the process of looping the first message back to the switch, the destination IP address of the first message is kept unchanged, wherein the destination IP address is the IP address corresponding to the receiving port of the network card, which is used to instruct the switch to send the first message to the network card.
6. A message transmission method, comprising: receiving a third message from the network and a first message from the network card for loopback, wherein when the first message is received by the network card from the first message from the switch, it is detected that the space occupation of the first cache meets a preset condition, and the first message is looped back to the switch; At least part of the third message and / or at least part of the first message are taken as new first messages and sent to the network card.
7. The method according to claim 6, characterized in that The receiving of the third message from the network and the first message looped back from the network card includes: Storing the third message in a first cache queue and storing the first message in a second cache queue; And sending at least part of the third message and / or at least part of the first message as a new first message to the network card includes: extracting the third message from the first cache queue as a new first message and sending it to the network card according to a preset priority, or extracting the first message from the second cache queue as a new first message and sending it to the network card; or, According to a preset weight, part of the third message is extracted from the first cache queue, and part of the first message is extracted from the second queue to form a new first message, which is sent to the network card.
8. A message transmission system, comprising: A switch and a network card, wherein the network card is arranged in a physical machine; wherein, The switch comprises a first receiving module, a second receiving module and a first sending module, wherein the first receiving module receives a third message from the network, and the second receiving module receives a first message from the network card for loopback, wherein when the first message is received by the network card as a first message from the switch, it is detected that the space occupation of the first cache meets a preset condition, and the first message is looped back to the switch; the first sending module uses at least part of the third message and / or at least part of the first message as a new first message and sends it to the network card; The network card includes a detection module, a loopback module and a distribution module, wherein the detection module receives a first message sent by the switch and detects whether the space occupancy of the first cache meets a preset condition; the loopback module, if detecting that the space occupancy of the first cache meets the preset condition, loops the first message back to the switch and instructs the switch to send the first message to the network card again; the distribution module distributes at least part of the second message in the first cache to at least one data processing node of the physical machine.
9. A message transmission device, characterized in that: include: A detection unit, configured to receive a first message sent by the switch, and detect whether the space occupancy of a first cache of the network card meets a preset condition; a loopback unit, configured to loop the first message back to the switch and instruct the switch to send the first message to the network card again if it is detected that the space occupancy of the first cache meets a preset condition; A distribution unit is used to distribute at least part of the second message in the first cache to at least one data processing node of the physical machine.
10. A message transmission device, comprising: a receiving unit, configured to receive a third message from the network and a first message looped back from the network card, wherein when the first message is received by the network card from the first message from the switch, it is detected that the space occupation of the first cache meets a preset condition, and the first message is looped back to the switch; A sending unit is used to send at least part of the third message and / or at least part of the first message as a new first message to the network card.
11. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 7 is implemented.