WO2021109851A1 - Network communication method, apparatus and device, and storage medium - Google Patents

Network communication method, apparatus and device, and storage medium Download PDF

Info

Publication number
WO2021109851A1
WO2021109851A1 PCT/CN2020/129147 CN2020129147W WO2021109851A1 WO 2021109851 A1 WO2021109851 A1 WO 2021109851A1 CN 2020129147 W CN2020129147 W CN 2020129147W WO 2021109851 A1 WO2021109851 A1 WO 2021109851A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
virtual machine
transmission
transmission network
detection information
Prior art date
Application number
PCT/CN2020/129147
Other languages
French (fr)
Chinese (zh)
Inventor
孙长江
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2021109851A1 publication Critical patent/WO2021109851A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/106Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/06Deflection routing, e.g. hot-potato routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers
    • H04L45/586Association of routers of virtual routers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/70Routing based on monitoring results
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control

Definitions

  • the embodiments of the present application relate to the field of network technology, and in particular, to a network communication method, device, device, and storage medium.
  • virtualization technology not only reduces the cost of information technology (Information Technology, IT), but also deploys dedicated equipment integrated business functions on ordinary servers, and multi-layer gateways And firewall filtering to prevent malicious attacks and traffic flooding, but also to enhance the security and reliability of the system.
  • Information Technology Information Technology
  • router virtualization products various types of single board functions are implemented on virtual machines. Multiple virtual machines (ie, multiple single boards) are connected and communicated through a transmission network. The quality of the communication network affects the router virtual Stability of chemical products.
  • the embodiments of the present application provide a network communication method, device, equipment, and storage medium.
  • an embodiment of the present application provides a network communication method, including: receiving network detection information sent by a master virtual machine; determining the priority of a transmission network according to the network detection information, and the transmission network is A communication network between the master virtual machines; the state information is transmitted to the master virtual machine based on the transmission network with the highest priority.
  • an embodiment of the present application also provides a network communication method, including: sending network detection information to a message forwarding virtual machine; receiving state information transmitted by the message forwarding virtual machine based on the transmission network with the highest priority, The transmission network with the highest priority is determined by the message forwarding virtual machine according to the network detection information, and the transmission network is a communication network with the message forwarding virtual machine.
  • an embodiment of the present application also provides a network communication device, including: a detection information receiving module, configured to receive network detection information sent by the master virtual machine; and a priority determining module, configured based on the network detection information Determine the priority of the transmission network, the transmission network is a communication network with the master virtual machine; a status information transmission module, used to transmit status information to the master virtual machine based on the transmission network with the highest priority .
  • an embodiment of the present application also provides a network communication device, including: a detection information sending module, configured to send network detection information to a message forwarding virtual machine; and a status information receiving module, configured to receive the message forwarding
  • the virtual machine is based on the transmission status information of the transmission network with the highest priority, the transmission network with the highest priority is determined by the message forwarding virtual machine according to the network detection information, and the transmission network is the same as that of the message forwarding virtual machine. Communication network between.
  • an embodiment of the present application also provides a device, the device includes: one or more processors; a storage device for storing one or more programs; when the one or more programs are One or more processors execute, so that the one or more processors implement the network communication method according to the first aspect and/or the network communication method according to the second aspect.
  • the embodiments of the present application also provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the network communication method as described in the first aspect is implemented, and/or as in the first aspect.
  • the network communication method described in the second aspect also provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the network communication method as described in the first aspect is implemented, and/or as in the first aspect.
  • Figure 1 is a schematic diagram of network communication
  • FIG. 2 is a flowchart of a network communication method provided in an embodiment of this application.
  • FIG. 3 is a schematic diagram of a network communication provided in an embodiment of this application.
  • FIG. 4 is a flowchart of another network communication method provided in an embodiment of this application.
  • FIG. 5 is a schematic structural diagram of a network communication device provided in an embodiment of this application.
  • FIG. 6 is a schematic structural diagram of another network communication device provided in an embodiment of this application.
  • FIG. 7 is a schematic structural diagram of a device provided in an embodiment of this application.
  • the network between virtual machines includes three transmission networks.
  • Transmission network 1 is used to automatically deploy virtual machines
  • transmission network 2 is a control message channel between virtual machines, and transmission network 3. It is a detection message channel and a cross-board data message channel between virtual machines; the network between the virtual machine and the outside includes three data networks.
  • a fixed transmission network is set up between virtual machines to transmit detection messages, such as transmission network 3 in Figure 1, and cross-board data messages are also transmitted through this transmission network.
  • detection messages such as transmission network 3 in Figure 1
  • cross-board data messages are also transmitted through this transmission network.
  • the transmission network is prone to congestion, resulting in the loss of detection packets between virtual machines, and the master virtual machine may not receive some packets within the detection time. Forward the virtual machine's detection packets This message will cause the message to be forwarded to the virtual machine’s offline false report.
  • the embodiments of the present application provide a network communication method, device, device, and storage medium to optimize the network communication scheme of the virtual router, avoid data loss, and improve the reliability of communication.
  • Figure 2 is a flow chart of a network communication method provided in an embodiment of the application. This embodiment is applicable to the case of implementing network communication in a virtual router.
  • the method can be executed by a network communication device, which can use software and It can be implemented in a hardware manner.
  • the device can be configured in a device.
  • the network communication device is configured in a packet forwarding virtual machine in a virtual router as an example for description.
  • the method in this embodiment is applied to a packet forwarding virtual machine, and the method may specifically include:
  • the master virtual machine also known as the Management Process Unit (MPU) is the master control in the virtual router.
  • MPU Management Process Unit
  • a set of virtual routers can include a master virtual machine and multiple packet forwarding virtual machines.
  • the packet forwarding virtual machine is also called Packet Forwarding Unit (PFU) or line card.
  • PFU Packet Forwarding Unit
  • DP Data Processing
  • Load Balance Load Balance
  • PP Physical Computing
  • PP Physical Computing
  • receiving the network detection information sent by the master virtual machine may include: receiving the network detection information sent by the master virtual machine through each transmission network, where the number of transmission networks is at least two.
  • the transmission network is a communication network between the message forwarding virtual machine and the master virtual machine.
  • the transmission network can transmit information based on the Multiple Access Control (MAC) protocol or the Internet Protocol (Internet Protocol) protocol. This embodiment Take the MAC protocol as an example for description.
  • the network detection information is used to check the stability of the transmission network.
  • the network detection information may be a network stability detection message, and the network detection information may include a timestamp and a transmission network mark.
  • the transmission network mark is used to distinguish different transmission networks.
  • the specific mark expression method is not used in this embodiment. Restrictions, for example, the marking of the transmission network can be represented by numbers or letters.
  • the message format of the network stability detection message can be "fa 16 3e 46 31 d2 fa 16 3e 20 f1 88 80 88 ab cd dc ba ff ff f0 f0 00 00 00 00 00 00 00 00 00 00 03 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  • determining the priority of the transmission network according to the network detection information may include: determining the transmission delay of each transmission network according to the timestamp in the network detection information and the mark of the transmission network; determining the priority of each transmission network based on the transmission delay level. According to the time stamp and the mark of the transmission network in the network detection information received within the set time period, the transmission delay of each transmission network is determined, and then the average delay in the set time period is determined.
  • the priority of each transmission network can be determined according to the transmission delay or the average delay. Both the transmission delay and the average delay are inversely proportional to the priority of the transmission network. The smaller the transmission delay or the average delay, the transmission network The higher the priority. The smaller the delay, the higher the stability of the transmission network.
  • determining the priority of each transmission network based on the transmission delay may include: sorting the transmission networks according to the transmission delay from small to large to obtain the sorting result; and setting the priority of the transmission network from high to low according to the sorting result.
  • the transmission network is sorted according to the transmission delay from small to large, and the sorting results are transmission network 1, transmission network 2 and transmission network 3, and the priority from high to low is transmission network 1, transmission network 2 and transmission network 3.
  • S130 Transmit the status information to the master virtual machine based on the transmission network with the highest priority.
  • the state information of the message forwarding virtual machine is transmitted to the master virtual machine based on the transmission network with the highest priority.
  • the message forwarding virtual machine can periodically send status information to the master virtual machine to inform that the machine is online.
  • the status information may be a single board detection message.
  • FIG. 3 is a schematic diagram of a network communication provided in an embodiment of the application, and FIG. 3 is only an example.
  • the transmission network between the message forwarding virtual machine 1 and the master virtual machine is transmission network 1, transmission network 2 and transmission network 3 in order of priority from high to low, and the message forwarding virtual machine 1 transmits this machine through transmission network 1.
  • the transmission network between the message forwarding virtual machine 2 and the master virtual machine is transmission network 2, transmission network 1, and transmission network 3 in order of priority from high to low, and the message forwarding virtual machine 1 passes through the transmission network 2 Transmit the status information of the machine;
  • the transmission network with the highest priority between the message forwarding virtual machine 3 and the master virtual machine is transmission network 3, and the message forwarding virtual machine 1 transmits the state information of the machine through the transmission network 3;
  • the transmission network with the highest priority between the message forwarding virtual machine 4 and the master virtual machine is the transmission network 1, and the message forwarding virtual machine 4 transmits the state information of the machine through the transmission network 1.
  • the network communication method in this embodiment may further include: if it is determined that the transmission network with the highest priority is congested, sending alarm information to the user. Specifically, it is determined whether the transmission network is blocked by whether the transmission delay of the transmission network with the highest priority is greater than the set delay threshold. If the transmission delay is greater than the set delay threshold, the transmission network with the highest priority is determined to be congested, indicating that all transmission networks are congested. Therefore, an alarm message needs to be sent to the user to prompt the user to check the transmission network. If the transmission delay is less than or equal to the set delay threshold, it means that the transmission network is not congested.
  • the set delay threshold can be set according to actual conditions, which is not limited in this embodiment.
  • the alarm information includes information such as the mark of the transmission network with the highest priority and the current transmission delay.
  • each packet forwarding virtual machine in the virtual router receives network detection information sent by the master virtual machine, and determines the priority of the transmission network according to the network detection information.
  • the transmission network is the one between the master virtual machine and the master virtual machine.
  • Inter-communication network based on the transmission network with the highest priority, transmits status information to the master virtual machine.
  • the message forwarding virtual machine determines the stability of each transmission network through network detection information, and then determines the priority, selects the transmission network with the highest priority to send information to the master virtual machine, and optimizes the network communication of the virtual router
  • the scheme avoids data loss and improves the reliability of communication; and when the transmission network is blocked, it can increase the warning to the user for detection and maintenance, and further improve the reliability of network communication.
  • Fig. 4 is a flowchart of another network communication method provided in an embodiment of the application.
  • this embodiment specifically describes the foregoing network communication method.
  • the method in this embodiment is applied to the master virtual machine in the virtual router, and the method may specifically include:
  • S210 Send network detection information to the message forwarding virtual machine.
  • the number of packet forwarding virtual machines may be at least one, and generally there are multiple.
  • the master virtual machine may send network detection information to each packet forwarding virtual machine through each transmission network at a set time interval, so that each packet forwarding virtual machine determines the transmission network with the highest priority based on the network detection information.
  • the specific value of the set time interval is not limited in this embodiment, and can be set according to actual conditions.
  • the network detection information may be a network stability detection message, which is used for the stability detection of the transmission network.
  • the number of transmission networks between the master virtual machine and each packet forwarding virtual machine can be at least two.
  • the received message forwarding virtual machine is based on the transmission status information of the transmission network with the highest priority, the transmission network with the highest priority is determined by the message forwarding virtual machine according to the network detection information, and the transmission network is between the message forwarding virtual machine and the message forwarding virtual machine. Communications network.
  • the master virtual machine can receive the transmission status information of each packet forwarding virtual machine based on the determined transmission network with the highest priority.
  • the transmission network with the highest priority determined by different packet forwarding virtual machines may be the same or different, see Figure 3, the message forwarding virtual machine 1, the message forwarding virtual machine 2 and the message forwarding virtual machine 3 correspond to the highest priority transmission networks are different, and the message forwarding virtual machine 1 and the message forwarding virtual machine 4 correspond to The transmission network with the highest priority is the same.
  • the state information of the machine can be transmitted to the master virtual machine based on the transmission network with the highest priority.
  • the master virtual machine can send a broadcast (Report) message to all other message forwarding virtual machines that are online to notify that there is a message forwarding virtual machine that is online.
  • the message forwarding virtual machine can periodically send status information to the master virtual machine to inform that the machine is online. If the master virtual machine does not receive the status information of the message forwarding virtual machine within the detection time, it determines that the message forwarding virtual machine is offline, and sends a broadcast (Report) message to all other message forwarding virtual machines that are online. Notify that a packet forwarding virtual machine is offline.
  • the status information may be a single board detection message.
  • the master virtual machine in the virtual router sends network detection information to the message forwarding virtual machine, and receives the message forwarding virtual machine based on the transmission status information of the highest priority transmission network.
  • the master virtual machine sends network detection information to each packet forwarding virtual machine, so that each packet forwarding virtual machine can determine the stability of each transmission network, and then determine the priority, and select the highest priority
  • the transmission network sends information to the master virtual machine, which optimizes the network communication scheme of the virtual router, avoids data loss, and improves the reliability of communication.
  • FIG. 5 is a schematic structural diagram of a network communication device provided in an embodiment of this application. This embodiment is applicable to a situation where network communication is implemented in a virtual router.
  • the network communication device provided by the embodiment of the present application can be configured in a message forwarding virtual machine in a virtual router, can execute the network communication method provided by the embodiment of the present application, and has corresponding functional modules and beneficial effects for the execution method.
  • the device specifically includes a detection information receiving module 310, a priority determination module 320, and a status information transmission module 330, wherein:
  • the detection information receiving module 310 is configured to receive network detection information sent by the master virtual machine
  • the priority determining module 320 is configured to determine the priority of the transmission network according to the network detection information, and the transmission network is a communication network with the master virtual machine;
  • the state information transmission module 330 is configured to transmit the state information to the master virtual machine based on the transmission network with the highest priority.
  • Each packet forwarding virtual machine in the virtual router in the embodiment of the present application receives network detection information sent by the master virtual machine, and determines the priority of the transmission network according to the network detection information.
  • the transmission network is between the master virtual machine and the network detection information.
  • the communication network transmits the status information to the master virtual machine based on the transmission network with the highest priority.
  • the message forwarding virtual machine determines the stability of each transmission network through network detection information, and then determines the priority, selects the transmission network with the highest priority to send information to the master virtual machine, and optimizes the virtual router's performance
  • the network communication scheme avoids data loss and improves the reliability of communication.
  • the detection information receiving module 310 is specifically configured to:
  • the network detection information sent by the master virtual machine is received through each transmission network, and the number of transmission networks is at least two.
  • the priority determining module 320 includes:
  • the delay unit is used to determine the transmission delay of each transmission network according to the time stamp in the network detection information and the mark of the transmission network;
  • the priority unit is used to determine the priority of each transmission network based on the transmission delay.
  • priority unit is specifically used for:
  • the device also includes:
  • the alarm module is used to send alarm information to the user if it is determined that the transmission network with the highest priority is blocked.
  • the network communication device provided by the embodiment of the present application can execute the network communication method provided by the embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.
  • FIG. 6 is a schematic structural diagram of another network communication device provided in an embodiment of this application. This embodiment can be applied to a situation where network communication is implemented in a virtual router.
  • the network communication device provided by the embodiment of the present application can be configured in the master virtual machine in the virtual router, can execute the network communication method provided by the embodiment of the present application, and has corresponding functional modules and beneficial effects for the execution method.
  • the device specifically includes a detection information sending module 410 and a status information receiving module 420, where:
  • the detection information sending module 410 is configured to send network detection information to the message forwarding virtual machine
  • the status information receiving module 420 is configured to receive the status information transmitted by the message forwarding virtual machine based on the transmission network with the highest priority.
  • the transmission network with the highest priority is determined by the message forwarding virtual machine according to the network detection information, and the transmission network is the same as the message Forward the communication network between virtual machines.
  • the network communication device provided by the embodiment of the present application can execute the network communication method provided by the embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.
  • FIG. 7 is a schematic structural diagram of a device provided in an embodiment of this application.
  • Figure 7 shows a block diagram of an exemplary device 412 suitable for implementing embodiments of the present application.
  • the device 412 shown in FIG. 7 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present application.
  • the device 412 is represented in the form of a general-purpose device.
  • the components of the device 412 may include, but are not limited to: one or more processors 416, a storage device 428, and a bus 418 connecting different system components (including the storage device 428 and the processor 416).
  • the bus 418 represents one or more of several types of bus structures, including a storage device bus or a storage device controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any bus structure among multiple bus structures.
  • these architectures include, but are not limited to, Industry Subversive Alliance (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (Video Electronics Standards) Association, VESA) local bus and Peripheral Component Interconnect (PCI) bus.
  • the device 412 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the device 412, including volatile and non-volatile media, removable and non-removable media.
  • the storage device 428 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) 430 and/or a cache memory 432.
  • the device 412 may further include other removable/non-removable, volatile/non-volatile computer system storage media.
  • the storage system 434 may be used to read and write non-removable, non-volatile magnetic media (not shown in FIG. 7 and commonly referred to as a "hard drive").
  • a disk drive for reading and writing to removable non-volatile disks such as "floppy disks”
  • a removable non-volatile optical disk such as a compact disc (Compact Disc Read)
  • each drive can be connected to the bus 418 through one or more data media interfaces.
  • the storage device 428 may include at least one program product, and the program product has a set of (for example, at least one) program modules, and these program modules are configured to perform the functions of the embodiments of the present application.
  • a program/utility tool 440 having a set of (at least one) program module 442 may be stored in, for example, the storage device 428.
  • Such program module 442 includes but is not limited to an operating system, one or more application programs, other program modules, and programs Data, each of these examples or some combination may include the realization of the network environment.
  • the program module 442 generally executes the functions and/or methods in the embodiments described in this application.
  • the device 412 can also communicate with one or more external devices 414 (such as a keyboard, a pointing terminal, a display 424, etc.), and can also communicate with one or more terminals that enable a user to interact with the device 412, and/or communicate with
  • the device 412 can communicate with any terminal (such as a network card, modem, etc.) that communicates with one or more other computing terminals. This communication can be performed through an input/output (I/O) interface 422.
  • the device 412 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 420. As shown in FIG.
  • the network adapter 420 communicates with other modules of the device 412 through the bus 418. It should be understood that although not shown in the figure, other hardware and/or software modules can be used in conjunction with the device 412, including but not limited to: microcode, terminal drives, redundant processors, external disk drive arrays, and disk arrays (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.
  • the processor 416 executes various functional applications and data processing by running programs stored in the storage device 428, for example, to implement the network communication method provided in the embodiment of the present application, the method includes:
  • the status information is transmitted to the master virtual machine based on the transmission network with the highest priority.
  • the method includes:
  • the received message forwarding virtual machine is based on the transmission status information of the transmission network with the highest priority.
  • the transmission network with the highest priority is determined by the message forwarding virtual machine based on network detection information.
  • the transmission network is the communication network with the message forwarding virtual machine. .
  • the embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored.
  • the program is executed by a processor, the network communication method provided in the embodiment of the present application is implemented, and the method includes:
  • the status information is transmitted to the master virtual machine based on the transmission network with the highest priority.
  • the method includes:
  • the received message forwarding virtual machine is based on the transmission status information of the transmission network with the highest priority.
  • the transmission network with the highest priority is determined by the message forwarding virtual machine based on network detection information.
  • the transmission network is the communication network with the message forwarding virtual machine. .
  • the computer storage medium of the embodiment of the present application may adopt any combination of one or more computer-readable media.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • 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 a combination of any of the above.
  • computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • RAM random access memory
  • ROM read-only memory
  • EPROM or flash memory Erasable programmable read-only memory
  • CD-ROM compact disk read-only memory
  • the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.
  • the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
  • the computer program code used to perform the operations of this application can be written in one or more programming languages or a combination thereof.
  • the programming languages include object-oriented programming languages—such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or terminal.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to pass Internet connection).
  • LAN local area network
  • WAN wide area network
  • Internet service provider for example, using an Internet service provider to pass Internet connection.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Disclosed are a network communication method, apparatus and device, and a storage medium. The method comprises: receiving network detection information sent by a main control virtual machine; determining the priority of a transmission network according to the network detection information, wherein the transmission network is a communication network with the main control virtual machine; and transmitting state information to the main control virtual machine on the basis of a transmission network with the highest priority.

Description

一种网络通信方法、装置、设备和存储介质Network communication method, device, equipment and storage medium
相关申请的交叉引用Cross-references to related applications
本申请基于申请号为201911244821.9、申请日为2019年12月6日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。This application is based on a Chinese patent application with application number 201911244821.9 and an application date of December 6, 2019, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated into this application by way of introduction.
技术领域Technical field
本申请实施例涉及网络技术领域,尤其涉及一种网络通信方法、装置、设备和存储介质。The embodiments of the present application relate to the field of network technology, and in particular, to a network communication method, device, device, and storage medium.
背景技术Background technique
随着近年多核系统、集群、网格以及云计算的广泛部署,虚拟化技术不仅降低了信息技术(Information Technology,IT)成本,将专用设备集成业务功能部署在普通的服务器上,而且多层网关和防火墙过滤,防止恶意攻击和流量泛洪,还增强了系统安全性和可靠性。With the widespread deployment of multi-core systems, clusters, grids, and cloud computing in recent years, virtualization technology not only reduces the cost of information technology (Information Technology, IT), but also deploys dedicated equipment integrated business functions on ordinary servers, and multi-layer gateways And firewall filtering to prevent malicious attacks and traffic flooding, but also to enhance the security and reliability of the system.
路由器虚拟化的产品中,各种类型的单板功能在虚拟机上实现,多个虚拟机(即多个单板)之间通过传输网络连接并进行通信,通信网络的好坏影响着路由器虚拟化产品的稳定性。In router virtualization products, various types of single board functions are implemented on virtual machines. Multiple virtual machines (ie, multiple single boards) are connected and communicated through a transmission network. The quality of the communication network affects the router virtual Stability of chemical products.
发明内容Summary of the invention
本申请实施例提供一种网络通信方法、装置、设备和存储介质。The embodiments of the present application provide a network communication method, device, equipment, and storage medium.
第一方面,本申请实施例提供了一种网络通信方法,包括:接收主控虚拟机发送的网络检测信息;根据所述网络检测信息确定传输网络的优先级,所述传输网络为与所述主控虚拟机之间的通信网络;基于优先级最高的传输网络将 状态信息传输至所述主控虚拟机。In the first aspect, an embodiment of the present application provides a network communication method, including: receiving network detection information sent by a master virtual machine; determining the priority of a transmission network according to the network detection information, and the transmission network is A communication network between the master virtual machines; the state information is transmitted to the master virtual machine based on the transmission network with the highest priority.
第二方面,本申请实施例还提供了一种网络通信方法,包括:向报文转发虚拟机发送网络检测信息;接收所述报文转发虚拟机基于优先级最高的传输网络传输的状态信息,所述优先级最高的传输网络由所述报文转发虚拟机根据所述网络检测信息确定,传输网络为与所述报文转发虚拟机之间的通信网络。In a second aspect, an embodiment of the present application also provides a network communication method, including: sending network detection information to a message forwarding virtual machine; receiving state information transmitted by the message forwarding virtual machine based on the transmission network with the highest priority, The transmission network with the highest priority is determined by the message forwarding virtual machine according to the network detection information, and the transmission network is a communication network with the message forwarding virtual machine.
第三方面,本申请实施例还提供了一种网络通信装置,包括:检测信息接收模块,用于接收主控虚拟机发送的网络检测信息;优先级确定模块,用于根据所述网络检测信息确定传输网络的优先级,所述传输网络为与所述主控虚拟机之间的通信网络;状态信息传输模块,用于基于优先级最高的传输网络将状态信息传输至所述主控虚拟机。In a third aspect, an embodiment of the present application also provides a network communication device, including: a detection information receiving module, configured to receive network detection information sent by the master virtual machine; and a priority determining module, configured based on the network detection information Determine the priority of the transmission network, the transmission network is a communication network with the master virtual machine; a status information transmission module, used to transmit status information to the master virtual machine based on the transmission network with the highest priority .
第四方面,本申请实施例还提供了一种网络通信装置,包括:检测信息发送模块,用于向报文转发虚拟机发送网络检测信息;状态信息接收模块,用于接收所述报文转发虚拟机基于优先级最高的传输网络传输的状态信息,所述优先级最高的传输网络由所述报文转发虚拟机根据所述网络检测信息确定,传输网络为与所述报文转发虚拟机之间的通信网络。In a fourth aspect, an embodiment of the present application also provides a network communication device, including: a detection information sending module, configured to send network detection information to a message forwarding virtual machine; and a status information receiving module, configured to receive the message forwarding The virtual machine is based on the transmission status information of the transmission network with the highest priority, the transmission network with the highest priority is determined by the message forwarding virtual machine according to the network detection information, and the transmission network is the same as that of the message forwarding virtual machine. Communication network between.
第五方面,本申请实施例还提供了一种设备,所述设备包括:一个或多个处理器;存储装置,用于存储一个或多个程序;当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如第一方面所述的网络通信方法,和/或如第二方面所述的网络通信方法。In a fifth aspect, an embodiment of the present application also provides a device, the device includes: one or more processors; a storage device for storing one or more programs; when the one or more programs are One or more processors execute, so that the one or more processors implement the network communication method according to the first aspect and/or the network communication method according to the second aspect.
第六方面,本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如第一方面所述的网络通信方法,和/或如第二方面所述的网络通信方法。In the sixth aspect, the embodiments of the present application also provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the network communication method as described in the first aspect is implemented, and/or as in the first aspect. The network communication method described in the second aspect.
附图说明Description of the drawings
图1为一种网络通信示意图;Figure 1 is a schematic diagram of network communication;
图2为本申请实施例中提供的一种网络通信方法的流程图;FIG. 2 is a flowchart of a network communication method provided in an embodiment of this application;
图3为本申请实施例中提供的一种网络通信的示意图;FIG. 3 is a schematic diagram of a network communication provided in an embodiment of this application;
图4为本申请实施例中提供的另一种网络通信方法的流程图;FIG. 4 is a flowchart of another network communication method provided in an embodiment of this application;
图5为本申请实施例中提供的一种网络通信装置的结构示意图;FIG. 5 is a schematic structural diagram of a network communication device provided in an embodiment of this application;
图6为本申请实施例中提供的另一种网络通信装置的结构示意图;FIG. 6 is a schematic structural diagram of another network communication device provided in an embodiment of this application;
图7为本申请实施例中提供的一种设备的结构示意图。FIG. 7 is a schematic structural diagram of a device provided in an embodiment of this application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The application will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described here are only used to explain the application, but not to limit the application. In addition, it should be noted that, for ease of description, the drawings only show a part of the structure related to the present application instead of all of the structure.
参见图1,图1为一种网络通信示意图,虚拟机之间的网络包括三个传输网络,传输网络1用来自动部署虚拟机,传输网络2是虚拟机间控制报文通道,传输网络3是虚拟机间检测报文通道和跨板数据报文通道;虚拟机与外部的网络包括三个数据网络。目前,虚拟机之间仅仅设置一条固定的传输网络进行检测报文的传输,如图1中的传输网络3,并且跨板数据报文也是通过该传输网络传输,当大量检测报文和跨板数据报文需要传输时,该传输网络就容易出现堵塞现象,导致虚拟机之间的检测报文丢失,进而主控虚拟机在检测时间内可能收不到某些报文转发虚拟机的检测报文,会造成该报文转发虚拟机的离线误上报。Refer to Figure 1, which is a schematic diagram of network communication. The network between virtual machines includes three transmission networks. Transmission network 1 is used to automatically deploy virtual machines, and transmission network 2 is a control message channel between virtual machines, and transmission network 3. It is a detection message channel and a cross-board data message channel between virtual machines; the network between the virtual machine and the outside includes three data networks. At present, only a fixed transmission network is set up between virtual machines to transmit detection messages, such as transmission network 3 in Figure 1, and cross-board data messages are also transmitted through this transmission network. When a large number of detection messages and cross-board When data packets need to be transmitted, the transmission network is prone to congestion, resulting in the loss of detection packets between virtual machines, and the master virtual machine may not receive some packets within the detection time. Forward the virtual machine's detection packets This message will cause the message to be forwarded to the virtual machine’s offline false report.
为此,本申请实施例提供一种网络通信方法、装置、设备和存储介质,以优化虚拟路由器的网络通信方案,避免数据丢失,提高通信的可靠性。To this end, the embodiments of the present application provide a network communication method, device, device, and storage medium to optimize the network communication scheme of the virtual router, avoid data loss, and improve the reliability of communication.
图2为本申请实施例中提供的一种网络通信方法的流程图,本实施例可适用于在虚拟路由器中实现网络通信的情况,该方法可以由网络通信装置执行,该装置可以采用软件和/或硬件的方式实现,该装置可配置于设备中,本实施例中以网络通信装置配置于虚拟路由器中的报文转发虚拟机中为例进行说明。如图2所示,本实施例中的方法应用于报文转发虚拟机,该方法具体可以包括:Figure 2 is a flow chart of a network communication method provided in an embodiment of the application. This embodiment is applicable to the case of implementing network communication in a virtual router. The method can be executed by a network communication device, which can use software and It can be implemented in a hardware manner. The device can be configured in a device. In this embodiment, the network communication device is configured in a packet forwarding virtual machine in a virtual router as an example for description. As shown in Figure 2, the method in this embodiment is applied to a packet forwarding virtual machine, and the method may specifically include:
S110、接收主控虚拟机发送的网络检测信息。S110. Receive network detection information sent by the master virtual machine.
其中,主控虚拟机,又称管理功能单元(Management Process Unit,MPU),是虚拟路由器中的主控。一套虚拟路由器中可以包括一个主控虚拟机和多个报文转发虚拟机,报文转发虚拟机又称报文转发处理单元(Packet Forwarding Unit, PFU)或线卡,根据类型的不同,可以包括数据处理(Data Processor,DP)、负载均衡(Load Balance,LB)、物理运算(Protocol Processor,PP)等单板。Among them, the master virtual machine, also known as the Management Process Unit (MPU), is the master control in the virtual router. A set of virtual routers can include a master virtual machine and multiple packet forwarding virtual machines. The packet forwarding virtual machine is also called Packet Forwarding Unit (PFU) or line card. Depending on the type, it can be Including data processing (Data Processor, DP), Load Balance (Load Balance, LB), Physical Computing (Protocol Processor, PP) and other boards.
具体的,接收主控虚拟机发送的网络检测信息,可以包括:通过各传输网络接收主控虚拟机发送的网络检测信息,传输网络的数量为至少两个。其中,传输网络为报文转发虚拟机和主控虚拟机之间的通信网络,传输网络可以基于多路控制(Multiple Access Control,MAC)协议或网络互联(Internet Protocol)协议传输信息,本实施例中以MAC协议为例进行说明。网络检测信息用于进行传输网络的稳定性检测。Specifically, receiving the network detection information sent by the master virtual machine may include: receiving the network detection information sent by the master virtual machine through each transmission network, where the number of transmission networks is at least two. Among them, the transmission network is a communication network between the message forwarding virtual machine and the master virtual machine. The transmission network can transmit information based on the Multiple Access Control (MAC) protocol or the Internet Protocol (Internet Protocol) protocol. This embodiment Take the MAC protocol as an example for description. The network detection information is used to check the stability of the transmission network.
S120、根据网络检测信息确定传输网络的优先级,传输网络为与主控虚拟机之间的通信网络。S120. Determine the priority of the transmission network according to the network detection information, where the transmission network is a communication network with the master virtual machine.
其中,网络检测信息可以为网络稳定性检测报文,网络检测信息中可以包括时间戳和传输网络的标记,传输网络的标记用于区分不同的传输网络,具体标记的表示方式本实施例中不作限定,例如传输网络的标记可以采用数字或字母进行表示。Among them, the network detection information may be a network stability detection message, and the network detection information may include a timestamp and a transmission network mark. The transmission network mark is used to distinguish different transmission networks. The specific mark expression method is not used in this embodiment. Restrictions, for example, the marking of the transmission network can be represented by numbers or letters.
示例性的,网络稳定性检测报文的报文格式可以为“fa 16 3e 46 31 d2 fa 16 3e 20 f1 88 80 88 ab cd dc ba ff ff f0 f0 00 00 00 00 00 00 00 00 00 03 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d9 85 a3 26 45 3d”,其中“fa 16 3e 46 31 d2 fa 16 3e 20 f1 88 80 88”为以太网(Ethernet)头,包括目的MAC、源MAC和类型;“ab cd dc ba ff ff f0 f0 00 00 00 00 00 00 00 00 00 03”为媒介(Media)头,“ab cd dc ba”表示校验和(Checksum),该值固定,“00 00”表示主控虚拟机的槽位号,“f0f0”表示私有数据,f0f0是单板检测报文,“00 00”表示缓存区头部空间的长度(Prelen),保留少字段,不填写,“00 00”表示片偏移/填充字段/标记(offset/pad/flag)等字段值,保留字段,不填写,“00 00 00 00”表示ID,保留字段,不填写,“00 03”表示实例ID(Instid),单板的MD线程实例号,该值与虚拟机的虚拟内核数有关,虚拟内核数不同,对应的Instid值不同。Exemplarily, the message format of the network stability detection message can be "fa 16 3e 46 31 d2 fa 16 3e 20 f1 88 80 88 ab cd dc ba ff ff f0 f0 00 00 00 00 00 00 00 00 00 00 03 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d9 85 a3 26 45 3d" 16 3e 46 31 d2 fa 16 3e 20 f1 88 80 88" is the Ethernet header, including destination MAC, source MAC and type; "ab cd dc ba ff ff f0 f0 00 00 00 00 00 00 00 00 00 03 "Is the Media header, "ab cd dc ba" means checksum (Checksum), the value is fixed, "00 00" means the slot number of the master virtual machine, "f0f0" means private data, and f0f0 means single Board detection message, "00 00" indicates the length of the buffer header space (Prelen), reserved few fields, do not fill in, "00 00" indicates the chip offset/padding field/flag (offset/pad/flag) and other fields Value, reserved field, do not fill in, "00 00 00 00" means ID, reserved field, do not fill in, "00 03" means instance ID (Instid), MD thread instance number of the board, this value is the same as the virtual core of the virtual machine The number is related, the number of virtual cores is different, the corresponding Instid value is different.
进一步的,“11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d9 85 a3 26 45 3d”为结构体(MSG)头,其中“11”表示传输网络的标记,11代表传输网络1,“00”表示序列号(Res),即发送报文的个数,“00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00”表示单板信息字段,网络稳定性检测报文不需要填写,置0,“00 00 d9 85 a3 26 45 3d”表示时间戳。在上述网络稳定性检测报文中,本实施例中重点关注的是传输网络的标记和时间戳。Further, "11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d9 85 a3 26 "Is the structure (MSG) header, where "11" represents the mark of the transmission network, 11 represents the transmission network 1, and "00" represents the serial number (Res), that is, the number of sent messages, "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "00 00 d9 85 a3 26 45 3d" represents the timestamp. In the foregoing network stability detection message, the focus in this embodiment is the marking and time stamp of the transmission network.
具体的,根据网络检测信息确定传输网络的优先级,可以包括:根据网络检测信息中的时间戳和传输网络的标记,确定各传输网络的传输时延;基于传输时延确定各传输网络的优先级。根据设定时间段内接收的网络检测信息中的时间戳和传输网络的标记,确定各传输网络的传输时延,进而确定该设定时间段内的平均时延。本实施例中可以根据传输时延或平均时延确定各传输网络的优先级,传输时延和平均时延均与传输网络的优先级成反比,传输时延或平均时延越小,传输网络的优先级越高。时延越小,说明传输网络的稳定性越高。Specifically, determining the priority of the transmission network according to the network detection information may include: determining the transmission delay of each transmission network according to the timestamp in the network detection information and the mark of the transmission network; determining the priority of each transmission network based on the transmission delay level. According to the time stamp and the mark of the transmission network in the network detection information received within the set time period, the transmission delay of each transmission network is determined, and then the average delay in the set time period is determined. In this embodiment, the priority of each transmission network can be determined according to the transmission delay or the average delay. Both the transmission delay and the average delay are inversely proportional to the priority of the transmission network. The smaller the transmission delay or the average delay, the transmission network The higher the priority. The smaller the delay, the higher the stability of the transmission network.
进一步的,基于传输时延确定各传输网络的优先级,可以包括:对传输网络按照传输时延从小到大进行排序,得到排序结果;根据排序结果对传输网络从高到低设置优先级。例如,传输网络按照传输时延从小到大进行排序的排序结果为传输网络1、传输网络2和传输网络3,优先级从高到低为传输网络1、传输网络2和传输网络3。Further, determining the priority of each transmission network based on the transmission delay may include: sorting the transmission networks according to the transmission delay from small to large to obtain the sorting result; and setting the priority of the transmission network from high to low according to the sorting result. For example, the transmission network is sorted according to the transmission delay from small to large, and the sorting results are transmission network 1, transmission network 2 and transmission network 3, and the priority from high to low is transmission network 1, transmission network 2 and transmission network 3.
S130、基于优先级最高的传输网络将状态信息传输至主控虚拟机。S130: Transmit the status information to the master virtual machine based on the transmission network with the highest priority.
具体的,确定传输网络的优先级之后,当报文转发虚拟机上线时,基于优先级最高的传输网络将本报文转发虚拟机的状态信息传输至主控虚拟机。之后,该报文转发虚拟机可以定时发送状态信息给主控虚拟机,告知本机在线。其中,状态信息可以为单板检测报文。Specifically, after the priority of the transmission network is determined, when the message forwarding virtual machine goes online, the state information of the message forwarding virtual machine is transmitted to the master virtual machine based on the transmission network with the highest priority. After that, the message forwarding virtual machine can periodically send status information to the master virtual machine to inform that the machine is online. Among them, the status information may be a single board detection message.
参见图3,图3为本申请实施例中提供的一种网络通信的示意图,图3中仅为一种示例。报文转发虚拟机1与主控虚拟机之间的传输网络按照优先级从高到低依次为传输网络1、传输网络2和传输网络3,报文转发虚拟机1通过传输网络1传输本机的状态信息;报文转发虚拟机2与主控虚拟机之间的传输网络按照优先级从高到低依次为传输网络2、传输网络1和传输网络3,报文转发虚拟机1通过传输网络2传输本机的状态信息;报文转发虚拟机3与主控虚拟机之间优先级最高的传输网络为传输网络3,报文转发虚拟机1通过传输网络3传输本机的状态信息;报文转发虚拟机4与主控虚拟机之间优先级最高的传输网络为传输网络1,报文转发虚拟机4通过传输网络1传输本机的状态信息。Referring to FIG. 3, FIG. 3 is a schematic diagram of a network communication provided in an embodiment of the application, and FIG. 3 is only an example. The transmission network between the message forwarding virtual machine 1 and the master virtual machine is transmission network 1, transmission network 2 and transmission network 3 in order of priority from high to low, and the message forwarding virtual machine 1 transmits this machine through transmission network 1. Status information; the transmission network between the message forwarding virtual machine 2 and the master virtual machine is transmission network 2, transmission network 1, and transmission network 3 in order of priority from high to low, and the message forwarding virtual machine 1 passes through the transmission network 2 Transmit the status information of the machine; the transmission network with the highest priority between the message forwarding virtual machine 3 and the master virtual machine is transmission network 3, and the message forwarding virtual machine 1 transmits the state information of the machine through the transmission network 3; The transmission network with the highest priority between the message forwarding virtual machine 4 and the master virtual machine is the transmission network 1, and the message forwarding virtual machine 4 transmits the state information of the machine through the transmission network 1.
此外,本实施例中的网络通信方法,还可以包括:如果确定优先级最高的传输网络堵塞,则发送告警信息给用户。具体通过优先级最高的传输网络的传输时延是否大于设定时延阈值,判断该传输网络是否堵塞。若传输时延大于设定时延阈值,则确定优先级最高的传输网络堵塞,说明全部传输网络均出现堵塞现象,因此需要发送告警信息给用户,以提示用户检查传输网络。若传输时延小于或等于设定时延阈值,则说明该传输网络不堵塞。其中,设定时延阈值可以根据实际情况进行设定,本实施例中不作限定。告警信息中包括优先级最高的传输网络的标记和当前的传输时延等信息。In addition, the network communication method in this embodiment may further include: if it is determined that the transmission network with the highest priority is congested, sending alarm information to the user. Specifically, it is determined whether the transmission network is blocked by whether the transmission delay of the transmission network with the highest priority is greater than the set delay threshold. If the transmission delay is greater than the set delay threshold, the transmission network with the highest priority is determined to be congested, indicating that all transmission networks are congested. Therefore, an alarm message needs to be sent to the user to prompt the user to check the transmission network. If the transmission delay is less than or equal to the set delay threshold, it means that the transmission network is not congested. Wherein, the set delay threshold can be set according to actual conditions, which is not limited in this embodiment. The alarm information includes information such as the mark of the transmission network with the highest priority and the current transmission delay.
本实施例的技术方案,虚拟路由器中的每个报文转发虚拟机通过接收主控虚拟机发送的网络检测信息,根据网络检测信息确定传输网络的优先级,传输网络为与主控虚拟机之间的通信网络,基于优先级最高的传输网络将状态信息传输至主控虚拟机。本申请实施例中,报文转发虚拟机通过网络检测信息确定各传输网络的稳定性,进而确定优先级,选择优先级最高的传输网络发送信息给主控虚拟机,优化了虚拟路由器的网络通信方案,避免数据丢失,提高了通信的可靠性;并且当传输网络出现堵塞的现象时,可以提高告警给用户,进行检测和维修,进一步提高了网络通信的可靠性。In the technical solution of this embodiment, each packet forwarding virtual machine in the virtual router receives network detection information sent by the master virtual machine, and determines the priority of the transmission network according to the network detection information. The transmission network is the one between the master virtual machine and the master virtual machine. Inter-communication network, based on the transmission network with the highest priority, transmits status information to the master virtual machine. In the embodiment of this application, the message forwarding virtual machine determines the stability of each transmission network through network detection information, and then determines the priority, selects the transmission network with the highest priority to send information to the master virtual machine, and optimizes the network communication of the virtual router The scheme avoids data loss and improves the reliability of communication; and when the transmission network is blocked, it can increase the warning to the user for detection and maintenance, and further improve the reliability of network communication.
图4为本申请实施例中提供的另一种网络通信方法的流程图。本实施例在上述实施例的基础上,对上述网络通信方法进行具体说明。相应的,如图4所示,本实施例中的方法应用于虚拟路由器中的主控虚拟机,该方法具体可以包括:Fig. 4 is a flowchart of another network communication method provided in an embodiment of the application. On the basis of the foregoing embodiment, this embodiment specifically describes the foregoing network communication method. Correspondingly, as shown in FIG. 4, the method in this embodiment is applied to the master virtual machine in the virtual router, and the method may specifically include:
S210、向报文转发虚拟机发送网络检测信息。S210: Send network detection information to the message forwarding virtual machine.
其中,报文转发虚拟机的数量可以为至少一个,一般为多个。Wherein, the number of packet forwarding virtual machines may be at least one, and generally there are multiple.
主控虚拟机可以按照设定时间间隔,通过各传输网络向每个报文转发虚拟机发送网络检测信息,以使每个报文转发虚拟机根据网络检测信息确定优先级最高的传输网络。其中,设定时间间隔的具体值本实施例中不作限定,可以根据实际情况进行设定。网络检测信息可以为网络稳定性检测报文,用于进行传输网络的稳定性检测。主控虚拟机与每个报文转发虚拟机之间的传输网络的数量均可以为至少两个。The master virtual machine may send network detection information to each packet forwarding virtual machine through each transmission network at a set time interval, so that each packet forwarding virtual machine determines the transmission network with the highest priority based on the network detection information. The specific value of the set time interval is not limited in this embodiment, and can be set according to actual conditions. The network detection information may be a network stability detection message, which is used for the stability detection of the transmission network. The number of transmission networks between the master virtual machine and each packet forwarding virtual machine can be at least two.
S220、接收报文转发虚拟机基于优先级最高的传输网络传输的状态信息, 优先级最高的传输网络由报文转发虚拟机根据网络检测信息确定,传输网络为与报文转发虚拟机之间的通信网络。S220. The received message forwarding virtual machine is based on the transmission status information of the transmission network with the highest priority, the transmission network with the highest priority is determined by the message forwarding virtual machine according to the network detection information, and the transmission network is between the message forwarding virtual machine and the message forwarding virtual machine. Communications network.
主控虚拟机可以接收每个报文转发虚拟机基于确定的优先级最高的传输网络传输的状态信息,不同的报文转发虚拟机确定的优先级最高的传输网络可能相同,也可能不同,参见图3,报文转发虚拟机1、报文转发虚拟机2和报文转发虚拟机3对应的优先级最高的传输网络均不同,而报文转发虚拟机1和报文转发虚拟机4对应的优先级最高的传输网络相同。The master virtual machine can receive the transmission status information of each packet forwarding virtual machine based on the determined transmission network with the highest priority. The transmission network with the highest priority determined by different packet forwarding virtual machines may be the same or different, see Figure 3, the message forwarding virtual machine 1, the message forwarding virtual machine 2 and the message forwarding virtual machine 3 correspond to the highest priority transmission networks are different, and the message forwarding virtual machine 1 and the message forwarding virtual machine 4 correspond to The transmission network with the highest priority is the same.
当一个报文转发虚拟机上线时,可以基于优先级最高的传输网络将本机的状态信息传输至主控虚拟机。主控虚拟机接收到状态信息之后,可以发送广播(Report)报文给全部在线的其他报文转发虚拟机,通知存在一个报文转发虚拟机上线。之后,该报文转发虚拟机可以定时发送状态信息给主控虚拟机,告知本机在线。主控虚拟机若在检测时间内未接收到该报文转发虚拟机的状态信息,则确定该报文转发虚拟机离线,发送广播(Report)报文给全部在线的其他报文转发虚拟机,告知存在一个报文转发虚拟机离线。其中,状态信息可以为单板检测报文。When a message forwarding virtual machine goes online, the state information of the machine can be transmitted to the master virtual machine based on the transmission network with the highest priority. After receiving the status information, the master virtual machine can send a broadcast (Report) message to all other message forwarding virtual machines that are online to notify that there is a message forwarding virtual machine that is online. After that, the message forwarding virtual machine can periodically send status information to the master virtual machine to inform that the machine is online. If the master virtual machine does not receive the status information of the message forwarding virtual machine within the detection time, it determines that the message forwarding virtual machine is offline, and sends a broadcast (Report) message to all other message forwarding virtual machines that are online. Notify that a packet forwarding virtual machine is offline. Among them, the status information may be a single board detection message.
本申请实施例提供的技术方案,虚拟路由器中的主控虚拟机,向报文转发虚拟机发送网络检测信息,接收报文转发虚拟机基于优先级最高的传输网络传输的状态信息。本申请实施例的技术方案,主控虚拟机通过发送网络检测信息给各个报文转发虚拟机,使各个报文转发虚拟机可以确定各传输网络的稳定性,进而确定优先级,选择优先级最高的传输网络发送信息给主控虚拟机,优化了虚拟路由器的网络通信方案,避免数据丢失,提高了通信的可靠性。In the technical solution provided by the embodiments of the present application, the master virtual machine in the virtual router sends network detection information to the message forwarding virtual machine, and receives the message forwarding virtual machine based on the transmission status information of the highest priority transmission network. In the technical solution of the embodiment of the present application, the master virtual machine sends network detection information to each packet forwarding virtual machine, so that each packet forwarding virtual machine can determine the stability of each transmission network, and then determine the priority, and select the highest priority The transmission network sends information to the master virtual machine, which optimizes the network communication scheme of the virtual router, avoids data loss, and improves the reliability of communication.
图5为本申请实施例中提供的一种网络通信装置的结构示意图,本实施例可适用于在虚拟路由器中实现网络通信的情况。本申请实施例所提供的网络通信装置可以配置于虚拟路由器中的报文转发虚拟机中,可执行本申请实施例所提供的网络通信方法,具备执行方法相应的功能模块和有益效果。FIG. 5 is a schematic structural diagram of a network communication device provided in an embodiment of this application. This embodiment is applicable to a situation where network communication is implemented in a virtual router. The network communication device provided by the embodiment of the present application can be configured in a message forwarding virtual machine in a virtual router, can execute the network communication method provided by the embodiment of the present application, and has corresponding functional modules and beneficial effects for the execution method.
该装置具体包括检测信息接收模块310、优先级确定模块320和状态信息传输模块330,其中:The device specifically includes a detection information receiving module 310, a priority determination module 320, and a status information transmission module 330, wherein:
检测信息接收模块310,用于接收主控虚拟机发送的网络检测信息;The detection information receiving module 310 is configured to receive network detection information sent by the master virtual machine;
优先级确定模块320,用于根据网络检测信息确定传输网络的优先级,传 输网络为与主控虚拟机之间的通信网络;The priority determining module 320 is configured to determine the priority of the transmission network according to the network detection information, and the transmission network is a communication network with the master virtual machine;
状态信息传输模块330,用于基于优先级最高的传输网络将状态信息传输至主控虚拟机。The state information transmission module 330 is configured to transmit the state information to the master virtual machine based on the transmission network with the highest priority.
本申请实施例虚拟路由器中的每个报文转发虚拟机,通过接收主控虚拟机发送的网络检测信息,根据网络检测信息确定传输网络的优先级,传输网络为与主控虚拟机之间的通信网络,基于优先级最高的传输网络将状态信息传输至主控虚拟机。本申请实施例的技术方案,报文转发虚拟机通过网络检测信息确定各传输网络的稳定性,进而确定优先级,选择优先级最高的传输网络发送信息给主控虚拟机,优化了虚拟路由器的网络通信方案,避免数据丢失,提高了通信的可靠性。Each packet forwarding virtual machine in the virtual router in the embodiment of the present application receives network detection information sent by the master virtual machine, and determines the priority of the transmission network according to the network detection information. The transmission network is between the master virtual machine and the network detection information. The communication network transmits the status information to the master virtual machine based on the transmission network with the highest priority. In the technical solution of the embodiment of the present application, the message forwarding virtual machine determines the stability of each transmission network through network detection information, and then determines the priority, selects the transmission network with the highest priority to send information to the master virtual machine, and optimizes the virtual router's performance The network communication scheme avoids data loss and improves the reliability of communication.
进一步的,检测信息接收模块310具体用于:Further, the detection information receiving module 310 is specifically configured to:
通过各传输网络接收主控虚拟机发送的网络检测信息,传输网络的数量为至少两个。The network detection information sent by the master virtual machine is received through each transmission network, and the number of transmission networks is at least two.
进一步的,优先级确定模块320包括:Further, the priority determining module 320 includes:
时延单元,用于根据网络检测信息中的时间戳和传输网络的标记,确定各传输网络的传输时延;The delay unit is used to determine the transmission delay of each transmission network according to the time stamp in the network detection information and the mark of the transmission network;
优先级单元,用于基于传输时延确定各传输网络的优先级。The priority unit is used to determine the priority of each transmission network based on the transmission delay.
进一步的,优先级单元具体用于:Further, the priority unit is specifically used for:
对传输网络按照传输时延从小到大进行排序,得到排序结果;Sort the transmission network according to the transmission delay from small to large, and obtain the sorting result;
根据排序结果对传输网络从高到低设置优先级。Set the priority of the transmission network from high to low according to the sorting result.
进一步的,该装置还包括:Further, the device also includes:
告警模块,用于如果确定优先级最高的传输网络堵塞,则发送告警信息给用户。The alarm module is used to send alarm information to the user if it is determined that the transmission network with the highest priority is blocked.
本申请实施例所提供的网络通信装置可执行本申请实施例所提供的网络通信方法,具备执行方法相应的功能模块和有益效果。The network communication device provided by the embodiment of the present application can execute the network communication method provided by the embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.
图6为本申请实施例中提供的另一种网络通信装置的结构示意图,本实施例可适用于在虚拟路由器中实现网络通信的情况。本申请实施例所提供的网络 通信装置可以配置于虚拟路由器中的主控虚拟机中,可执行本申请实施例所提供的网络通信方法,具备执行方法相应的功能模块和有益效果。FIG. 6 is a schematic structural diagram of another network communication device provided in an embodiment of this application. This embodiment can be applied to a situation where network communication is implemented in a virtual router. The network communication device provided by the embodiment of the present application can be configured in the master virtual machine in the virtual router, can execute the network communication method provided by the embodiment of the present application, and has corresponding functional modules and beneficial effects for the execution method.
该装置具体包括检测信息发送模块410和状态信息接收模块420,其中:The device specifically includes a detection information sending module 410 and a status information receiving module 420, where:
检测信息发送模块410,用于向报文转发虚拟机发送网络检测信息;The detection information sending module 410 is configured to send network detection information to the message forwarding virtual machine;
状态信息接收模块420,用于接收报文转发虚拟机基于优先级最高的传输网络传输的状态信息,优先级最高的传输网络由报文转发虚拟机根据网络检测信息确定,传输网络为与报文转发虚拟机之间的通信网络。The status information receiving module 420 is configured to receive the status information transmitted by the message forwarding virtual machine based on the transmission network with the highest priority. The transmission network with the highest priority is determined by the message forwarding virtual machine according to the network detection information, and the transmission network is the same as the message Forward the communication network between virtual machines.
本申请实施例所提供的网络通信装置可执行本申请实施例所提供的网络通信方法,具备执行方法相应的功能模块和有益效果。The network communication device provided by the embodiment of the present application can execute the network communication method provided by the embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.
图7为本申请实施例中提供的一种设备的结构示意图。图7示出了适于用来实现本申请实施方式的示例性设备412的框图。图7显示的设备412仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。FIG. 7 is a schematic structural diagram of a device provided in an embodiment of this application. Figure 7 shows a block diagram of an exemplary device 412 suitable for implementing embodiments of the present application. The device 412 shown in FIG. 7 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present application.
如图7所示,设备412以通用设备的形式表现。设备412的组件可以包括但不限于:一个或者多个处理器416,存储装置428,连接不同系统组件(包括存储装置428和处理器416)的总线418。As shown in FIG. 7, the device 412 is represented in the form of a general-purpose device. The components of the device 412 may include, but are not limited to: one or more processors 416, a storage device 428, and a bus 418 connecting different system components (including the storage device 428 and the processor 416).
总线418表示几类总线结构中的一种或多种,包括存储装置总线或者存储装置控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(Industry Subversive Alliance,ISA)总线,微通道体系结构(Micro Channel Architecture,MAC)总线,增强型ISA总线、视频电子标准协会(Video Electronics Standards Association,VESA)局域总线以及外围组件互连(Peripheral Component Interconnect,PCI)总线。The bus 418 represents one or more of several types of bus structures, including a storage device bus or a storage device controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any bus structure among multiple bus structures. For example, these architectures include, but are not limited to, Industry Subversive Alliance (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (Video Electronics Standards) Association, VESA) local bus and Peripheral Component Interconnect (PCI) bus.
设备412典型地包括多种计算机系统可读介质。这些介质可以是任何能够被设备412访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。The device 412 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the device 412, including volatile and non-volatile media, removable and non-removable media.
存储装置428可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(Random Access Memory,RAM)430和/或高速缓存存储器432。设备412可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统 存储介质。仅作为举例,存储系统434可以用于读写不可移动的、非易失性磁介质(图7未显示,通常称为“硬盘驱动器”)。尽管图7中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘,例如只读光盘(Compact Disc Read-Only Memory,CD-ROM),数字视盘(Digital Video Disc-Read Only Memory,DVD-ROM)或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线418相连。存储装置428可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本申请各实施例的功能。The storage device 428 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) 430 and/or a cache memory 432. The device 412 may further include other removable/non-removable, volatile/non-volatile computer system storage media. For example only, the storage system 434 may be used to read and write non-removable, non-volatile magnetic media (not shown in FIG. 7 and commonly referred to as a "hard drive"). Although not shown in FIG. 7, a disk drive for reading and writing to removable non-volatile disks (such as "floppy disks") and a removable non-volatile optical disk such as a compact disc (Compact Disc Read) can be provided. -Only Memory, CD-ROM), Digital Video Disc-Read Only Memory (DVD-ROM) or other optical media) read and write optical disc drives. In these cases, each drive can be connected to the bus 418 through one or more data media interfaces. The storage device 428 may include at least one program product, and the program product has a set of (for example, at least one) program modules, and these program modules are configured to perform the functions of the embodiments of the present application.
具有一组(至少一个)程序模块442的程序/实用工具440,可以存储在例如存储装置428中,这样的程序模块442包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块442通常执行本申请所描述的实施例中的功能和/或方法。A program/utility tool 440 having a set of (at least one) program module 442 may be stored in, for example, the storage device 428. Such program module 442 includes but is not limited to an operating system, one or more application programs, other program modules, and programs Data, each of these examples or some combination may include the realization of the network environment. The program module 442 generally executes the functions and/or methods in the embodiments described in this application.
设备412也可以与一个或多个外部设备414(例如键盘、指向终端、显示器424等)通信,还可与一个或者多个使得用户能与该设备412交互的终端通信,和/或与使得该设备412能与一个或多个其它计算终端进行通信的任何终端(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口422进行。并且,设备412还可以通过网络适配器420与一个或者多个网络(例如局域网(Local Area Network,LAN),广域网(Wide Area Network,WAN)和/或公共网络,例如因特网)通信。如图7所示,网络适配器420通过总线418与设备412的其它模块通信。应当明白,尽管图中未示出,可以结合设备412使用其它硬件和/或软件模块,包括但不限于:微代码、终端驱动器、冗余处理器、外部磁盘驱动阵列、磁盘阵列(Redundant Arrays of Independent Disks,RAID)系统、磁带驱动器以及数据备份存储系统等。The device 412 can also communicate with one or more external devices 414 (such as a keyboard, a pointing terminal, a display 424, etc.), and can also communicate with one or more terminals that enable a user to interact with the device 412, and/or communicate with The device 412 can communicate with any terminal (such as a network card, modem, etc.) that communicates with one or more other computing terminals. This communication can be performed through an input/output (I/O) interface 422. In addition, the device 412 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 420. As shown in FIG. 7, the network adapter 420 communicates with other modules of the device 412 through the bus 418. It should be understood that although not shown in the figure, other hardware and/or software modules can be used in conjunction with the device 412, including but not limited to: microcode, terminal drives, redundant processors, external disk drive arrays, and disk arrays (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.
处理器416通过运行存储在存储装置428中的程序,从而执行各种功能应用以及数据处理,例如实现本申请实施例所提供的网络通信方法,该方法包括:The processor 416 executes various functional applications and data processing by running programs stored in the storage device 428, for example, to implement the network communication method provided in the embodiment of the present application, the method includes:
接收主控虚拟机发送的网络检测信息;Receive network detection information sent by the master virtual machine;
根据网络检测信息确定传输网络的优先级,传输网络为与主控虚拟机之间的通信网络;Determine the priority of the transmission network according to the network detection information, and the transmission network is the communication network with the master virtual machine;
基于优先级最高的传输网络将状态信息传输至主控虚拟机。The status information is transmitted to the master virtual machine based on the transmission network with the highest priority.
和/或,实现本申请实施例所提供的网络通信方法,该方法包括:And/or, to implement the network communication method provided in the embodiment of the present application, the method includes:
向报文转发虚拟机发送网络检测信息;Send network detection information to the packet forwarding virtual machine;
接收报文转发虚拟机基于优先级最高的传输网络传输的状态信息,优先级最高的传输网络由报文转发虚拟机根据网络检测信息确定,传输网络为与报文转发虚拟机之间的通信网络。The received message forwarding virtual machine is based on the transmission status information of the transmission network with the highest priority. The transmission network with the highest priority is determined by the message forwarding virtual machine based on network detection information. The transmission network is the communication network with the message forwarding virtual machine. .
本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本申请实施例所提供的网络通信方法,该方法包括:The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the network communication method provided in the embodiment of the present application is implemented, and the method includes:
接收主控虚拟机发送的网络检测信息;Receive network detection information sent by the master virtual machine;
根据网络检测信息确定传输网络的优先级,传输网络为与主控虚拟机之间的通信网络;Determine the priority of the transmission network according to the network detection information, and the transmission network is the communication network with the master virtual machine;
基于优先级最高的传输网络将状态信息传输至主控虚拟机。The status information is transmitted to the master virtual machine based on the transmission network with the highest priority.
和/或,实现本申请实施例所提供的网络通信方法,该方法包括:And/or, to implement the network communication method provided in the embodiment of the present application, the method includes:
向报文转发虚拟机发送网络检测信息;Send network detection information to the packet forwarding virtual machine;
接收报文转发虚拟机基于优先级最高的传输网络传输的状态信息,优先级最高的传输网络由报文转发虚拟机根据网络检测信息确定,传输网络为与报文转发虚拟机之间的通信网络。The received message forwarding virtual machine is based on the transmission status information of the transmission network with the highest priority. The transmission network with the highest priority is determined by the message forwarding virtual machine based on network detection information. The transmission network is the communication network with the message forwarding virtual machine. .
本申请实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The computer storage medium of the embodiment of the present application may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. 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 a combination of any of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据 信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。The computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于无线、电线、光缆、RF等等,或者上述的任意合适的组合。The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
可以以一种或多种程序设计语言或其组合来编写用于执行本申请操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或终端上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。The computer program code used to perform the operations of this application can be written in one or more programming languages or a combination thereof. The programming languages include object-oriented programming languages—such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language. The program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or terminal. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to pass Internet connection).
注意,上述仅为本申请的较佳实施例及所运用技术原理。本领域技术人员会理解,本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其他等效实施例,而本申请的范围由所附的权利要求范围决定。Note that the above are only the preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made to those skilled in the art without departing from the protection scope of the present application. Therefore, although the application has been described in more detail through the above embodiments, the application is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the application. The scope of is determined by the scope of the appended claims.

Claims (10)

  1. 一种网络通信方法,包括:A network communication method, including:
    接收主控虚拟机发送的网络检测信息;Receive network detection information sent by the master virtual machine;
    根据所述网络检测信息确定传输网络的优先级,所述传输网络为与所述主控虚拟机之间的通信网络;Determining the priority of the transmission network according to the network detection information, the transmission network being a communication network with the master virtual machine;
    基于优先级最高的传输网络将状态信息传输至所述主控虚拟机。The state information is transmitted to the master virtual machine based on the transmission network with the highest priority.
  2. 根据权利要求1所述的方法,其中,所述接收主控虚拟机发送的网络检测信息,包括:The method according to claim 1, wherein said receiving the network detection information sent by the master virtual machine comprises:
    通过各所述传输网络接收所述主控虚拟机发送的网络检测信息,所述传输网络的数量为至少两个。The network detection information sent by the master virtual machine is received through each of the transmission networks, and the number of the transmission networks is at least two.
  3. 根据权利要求1所述的方法,其中,根据所述网络检测信息确定传输网络的优先级,包括:The method according to claim 1, wherein determining the priority of the transmission network according to the network detection information comprises:
    根据所述网络检测信息中的时间戳和传输网络的标记,确定各所述传输网络的传输时延;Determine the transmission delay of each transmission network according to the time stamp in the network detection information and the mark of the transmission network;
    基于所述传输时延确定各所述传输网络的优先级。The priority of each transmission network is determined based on the transmission delay.
  4. 根据权利要求3所述的方法,其中,基于所述传输时延确定各所述传输网络的优先级,包括:The method according to claim 3, wherein determining the priority of each of the transmission networks based on the transmission delay comprises:
    对所述传输网络按照所述传输时延从小到大进行排序,得到排序结果;Sorting the transmission network according to the transmission delay from small to large to obtain a sorting result;
    根据所述排序结果对所述传输网络从高到低设置优先级。Prioritize the transmission network from high to low according to the sorting result.
  5. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising:
    如果确定所述优先级最高的传输网络堵塞,则发送告警信息给用户。If it is determined that the transmission network with the highest priority is congested, an alarm message is sent to the user.
  6. 一种网络通信方法,包括:A network communication method, including:
    向报文转发虚拟机发送网络检测信息;Send network detection information to the packet forwarding virtual machine;
    接收所述报文转发虚拟机基于优先级最高的传输网络传输的状态信息,所述优先级最高的传输网络由所述报文转发虚拟机根据所述网络检测信息确定,传输网络为与所述报文转发虚拟机之间的通信网络。The message forwarding virtual machine receives the transmission status information based on the transmission network with the highest priority, the transmission network with the highest priority is determined by the message forwarding virtual machine according to the network detection information, and the transmission network is The communication network between the virtual machines for packet forwarding.
  7. 一种网络通信装置,包括:A network communication device includes:
    检测信息接收模块,用于接收主控虚拟机发送的网络检测信息;The detection information receiving module is used to receive the network detection information sent by the master virtual machine;
    优先级确定模块,用于根据所述网络检测信息确定传输网络的优先级,所述传输网络为与所述主控虚拟机之间的通信网络;A priority determining module, configured to determine the priority of a transmission network according to the network detection information, the transmission network being a communication network with the master virtual machine;
    状态信息传输模块,用于基于优先级最高的传输网络将状态信息传输至所述主控虚拟机。The state information transmission module is used to transmit the state information to the master virtual machine based on the transmission network with the highest priority.
  8. 一种网络通信装置,包括:A network communication device includes:
    检测信息发送模块,用于向报文转发虚拟机发送网络检测信息;The detection information sending module is used to send network detection information to the message forwarding virtual machine;
    状态信息接收模块,用于接收所述报文转发虚拟机基于优先级最高的传输网络传输的状态信息,所述优先级最高的传输网络由所述报文转发虚拟机根据所述网络检测信息确定,传输网络为与所述报文转发虚拟机之间的通信网络。The status information receiving module is configured to receive the status information transmitted by the message forwarding virtual machine based on the transmission network with the highest priority, and the transmission network with the highest priority is determined by the message forwarding virtual machine according to the network detection information , The transmission network is a communication network with the message forwarding virtual machine.
  9. 一种设备,包括:A device that includes:
    一个或多个处理器;One or more processors;
    存储装置,用于存储一个或多个程序;Storage device for storing one or more programs;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-5中任一所述的网络通信方法,和/或权利要求6所述的网络通信方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the network communication method according to any one of claims 1-5, and/or claims 6. The network communication method described.
  10. 一种计算机可读存储介质,其上存储有计算机程序,其中,该程序被处理器执行时实现如权利要求1-5中任一所述的网络通信方法,和/或权利要求6所述的网络通信方法。A computer-readable storage medium with a computer program stored thereon, wherein the program is executed by a processor to implement the network communication method according to any one of claims 1-5, and/or the method described in claim 6 Network communication method.
PCT/CN2020/129147 2019-12-06 2020-11-16 Network communication method, apparatus and device, and storage medium WO2021109851A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911244821.9A CN112929197A (en) 2019-12-06 2019-12-06 Network communication method, device, equipment and storage medium
CN201911244821.9 2019-12-06

Publications (1)

Publication Number Publication Date
WO2021109851A1 true WO2021109851A1 (en) 2021-06-10

Family

ID=76161942

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/129147 WO2021109851A1 (en) 2019-12-06 2020-11-16 Network communication method, apparatus and device, and storage medium

Country Status (2)

Country Link
CN (1) CN112929197A (en)
WO (1) WO2021109851A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113923253A (en) * 2021-10-12 2022-01-11 西安万像电子科技有限公司 Virtual machine image transmission method, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009001153A1 (en) * 2007-06-28 2008-12-31 Nokia Corporation Memory protection unit in a virtual processing environment
WO2014020752A1 (en) * 2012-08-03 2014-02-06 株式会社日立製作所 Server computer and server computation method
CN106804112A (en) * 2014-06-17 2017-06-06 诺基亚通信公司 Method and apparatus for controlling virtual machine
CN107517119A (en) * 2016-06-17 2017-12-26 阿里巴巴集团控股有限公司 Virtual network detection method and device under VPC environment
CN107996023A (en) * 2016-11-23 2018-05-04 华为技术有限公司 Monitor method, equipment and the Virtual Networking System of virtual network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009001153A1 (en) * 2007-06-28 2008-12-31 Nokia Corporation Memory protection unit in a virtual processing environment
WO2014020752A1 (en) * 2012-08-03 2014-02-06 株式会社日立製作所 Server computer and server computation method
CN106804112A (en) * 2014-06-17 2017-06-06 诺基亚通信公司 Method and apparatus for controlling virtual machine
CN107517119A (en) * 2016-06-17 2017-12-26 阿里巴巴集团控股有限公司 Virtual network detection method and device under VPC environment
CN107996023A (en) * 2016-11-23 2018-05-04 华为技术有限公司 Monitor method, equipment and the Virtual Networking System of virtual network

Also Published As

Publication number Publication date
CN112929197A (en) 2021-06-08

Similar Documents

Publication Publication Date Title
US11765074B2 (en) System and method for facilitating hybrid message matching in a network interface controller (NIC)
US11882041B2 (en) Congestion notification packet indicating specific packet flow experiencing congestion to facilitate individual packet flow based transmission rate control
US8913613B2 (en) Method and system for classification and management of inter-blade network traffic in a blade server
US20190230039A1 (en) Method and system for extracting in-tunnel flow data over a virtual network
WO2019233179A1 (en) Data message detection method, device and system
WO2019033857A1 (en) Packet control method and network device
US8036127B2 (en) Notifying network applications of receive overflow conditions
CN113326228B (en) Message forwarding method, device and equipment based on remote direct data storage
US20140233565A1 (en) Systems and methods for path maximum transmission unit discovery
US20110261686A1 (en) Priority Pause (PFC) in Virtualized/Non-Virtualized Information Handling System Environment
CN103929334A (en) Network abnormity notification method and apparatus
WO2016082456A1 (en) Board, board management method and system, and storage medium
US20080062960A1 (en) Systems and methods for packet forward control
WO2020073907A1 (en) Method and apparatus for updating forwarding entry
US11356372B2 (en) Data traffic processing method, device, and system
JP4861293B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM
US20120102149A1 (en) Inter-Board Communication Apparatus, Method for Transmitting and Receiving Message of Inter-Board Communication
CN105391647A (en) Method and system for flow control
WO2021109851A1 (en) Network communication method, apparatus and device, and storage medium
WO2021244262A1 (en) Packet processing method, device and system
CN109286564B (en) Message forwarding method and device
CN107483628B (en) DPDK-based one-way proxy method and system
US20080002586A1 (en) End-point based tamper resistant congestion management
WO2009105978A1 (en) Router and managing and controlling method in router
CN109728926B (en) Communication method and network device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20896924

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20896924

Country of ref document: EP

Kind code of ref document: A1